summaryrefslogtreecommitdiff
path: root/completions/svk
diff options
context:
space:
mode:
Diffstat (limited to 'completions/svk')
-rw-r--r--completions/svk10
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/svk b/completions/svk
index 6d416be4..d60e1285 100644
--- a/completions/svk
+++ b/completions/svk
@@ -4,10 +4,10 @@ have svk || return
_svk()
{
- local cur prev commands options command
+ local cur prev words cword
+ _init_completion || return
- COMPREPLY=()
- _get_comp_words_by_ref cur prev
+ local commands options command
commands='add admin annotate ann blame praise cat checkout co cleanup \
cmerge cm commit ci copy cp delete del remove rm depotmap \
@@ -17,7 +17,7 @@ _svk()
pset pull push resolved revert smerge sm status st stat switch \
sw sync sy update up verify'
- if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ $cword -eq 1 ]] ; then
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
else
@@ -36,7 +36,7 @@ _svk()
;;
esac
- command=${COMP_WORDS[1]}
+ command=${words[1]}
if [[ "$cur" == -* ]]; then
# possible options for the command