about summary refs log tree commit diff
path: root/Completion/Cvs
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-27 12:04:52 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-27 12:04:52 +0000
commitbd29ea48ec58524eee4c2cf9409cde340389488c (patch)
tree3dde31971ad6d56b20a5497edd42475941814b11 /Completion/Cvs
parent0161b1ca7752c4a768dd3dcf38493290b9d36ff7 (diff)
downloadzsh-bd29ea48ec58524eee4c2cf9409cde340389488c.tar.gz
zsh-bd29ea48ec58524eee4c2cf9409cde340389488c.tar.xz
zsh-bd29ea48ec58524eee4c2cf9409cde340389488c.zip
zsh-workers/7516
Diffstat (limited to 'Completion/Cvs')
-rw-r--r--Completion/Cvs/_cvs2
-rw-r--r--Completion/Cvs/_cvs_command53
-rw-r--r--Completion/Cvs/_cvs_logout3
3 files changed, 32 insertions, 26 deletions
diff --git a/Completion/Cvs/_cvs b/Completion/Cvs/_cvs
index b064ee2df..bb4c5fed0 100644
--- a/Completion/Cvs/_cvs
+++ b/Completion/Cvs/_cvs
@@ -10,5 +10,5 @@ _arguments -s \
   '-d+:cvsroot:_cvs_root' \
   '-e+:editor:_cvs_editor' \
   '-s+:user variable:_cvs_user_variable' \
-  '-z:gzip level:_cvs_gzip_level' \
+  '-z+:gzip level:_cvs_gzip_level' \
   '*::cvs command:_cvs_command'
diff --git a/Completion/Cvs/_cvs_command b/Completion/Cvs/_cvs_command
index d2db059ea..e56f54704 100644
--- a/Completion/Cvs/_cvs_command
+++ b/Completion/Cvs/_cvs_command
@@ -1,40 +1,43 @@
 #autoload
 
 typeset -A cmds
-cmds=(add "ad new"            admin "adm rcs"         annotate ann
-      checkout "co get"       commit "ci com"         diff "di dif"
-      edit ""                 editors ""              export "exp ex"
-      history "hi his"        import "im imp"         init ""
-      log "lo rlog"           login "logon lgn"       logout ""
-      rdiff patch             release "re rel"        remove "rm delete"
-      status "st stat"        rtag "rt rfreeze"       tag "ta freeze"
-      unedit ""               update "up upd"         watch ""
+cmds=(add " ad new "          admin " adm rcs "       annotate " ann "
+      checkout " co get "     commit " ci com "       diff " di dif "
+      edit ""                 editors ""              export " exp ex "
+      history " hi his "      import " im imp "       init ""
+      log " lo rlog "         login " logon lgn "     logout ""
+      rdiff " patch pa "      release " re rel "      remove " rm delete "
+      status " st stat "      rtag " rt rfreeze "     tag " ta freeze "
+      unedit ""               update " up upd "       watch ""
       watchers "")
 
 if (( CURRENT == 1 )); then
   compadd ${(k)cmds} || compadd ${(kv)=cmds}
 else
-  case "$words[1]" in
-    add|ad|new) _cvs_add;;
-    admin|adm|rcs) _cvs_admin;;
-    annotate|ann) _cvs_annotate;;
-    checkout|co|get) _cvs_checkout;;
-    commit|ci|com) _cvs_commit;;
-    diff|di|dif) _cvs_diff;;
+  case "${${(k)cmds[(R)* $words[1] *]}:-$words[1]}" in
+    add) _cvs_add;;
+    admin) _cvs_admin;;
+    annotate) _cvs_annotate;;
+    checkout) _cvs_checkout;;
+    commit) _cvs_commit;;
+    diff) _cvs_diff;;
     edit) _cvs_edit;;
     editors) _cvs_editors;;
-    export|exp|ex) _cvs_export;;
-    history|hi|his) _cvs_history;;
-    import|im|imp) _cvs_import;;
+    export) _cvs_export;;
+    history) _cvs_history;;
+    import) _cvs_import;;
     init) _cvs_init;;
-    login|logon|lgn|logout) _cvs_login;;
-    rdiff|patch|pa) _cvs_rdiff;;
-    release|re|rel) _cvs_release;;
-    remove|rm|delete) _cvs_remove;;
-    status|st|stat) _cvs_status;;
-    tag|ta|freeze) _cvs_tag;;
+    log) _cvs_log;;
+    login) _cvs_login;;
+    logout) _cvs_logout;;
+    rdiff) _cvs_rdiff;;
+    release) _cvs_release;;
+    remove) _cvs_remove;;
+    status) _cvs_status;;
+    rtag) _cvs_rtag;;
+    tag) _cvs_tag;;
     unedit) _cvs_unedit;;
-    update|up|upd) _cvs_update;;
+    update) _cvs_update;;
     watch) _cvs_watch;;
     watchers) _cvs_watchers;;
     *) _message "unknown cvs command: $words[1]";;
diff --git a/Completion/Cvs/_cvs_logout b/Completion/Cvs/_cvs_logout
new file mode 100644
index 000000000..f24867434
--- /dev/null
+++ b/Completion/Cvs/_cvs_logout
@@ -0,0 +1,3 @@
+#autoload
+
+false