about summary refs log tree commit diff
path: root/Completion/Unix/Command/_monotone
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-10-14 23:03:40 +0200
committerOliver Kiddle <opk@zsh.org>2014-10-14 23:04:45 +0200
commit13fc579343b24d298fb8905933b6000d7fcda114 (patch)
treecbc1000696357438714107635f93166bcab76d3a /Completion/Unix/Command/_monotone
parent66320ca93a717467a0ed0d34da4c06257953aa50 (diff)
downloadzsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.gz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.xz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.zip
33467: correct return status on functions and numerous other minor fixes
Diffstat (limited to 'Completion/Unix/Command/_monotone')
-rw-r--r--Completion/Unix/Command/_monotone36
1 files changed, 19 insertions, 17 deletions
diff --git a/Completion/Unix/Command/_monotone b/Completion/Unix/Command/_monotone
index 83e18e306..bcaab87f0 100644
--- a/Completion/Unix/Command/_monotone
+++ b/Completion/Unix/Command/_monotone
@@ -1,8 +1,22 @@
 #compdef mtn
 
-local context state line ret
-typeset -a cmds
-typeset -A opt_args
+local -a cmds
+cmds=(
+  automate:automation db:database fdiff:debug fload:debug fmerge:debug
+  get_roster:debug identify:debug rcs_import:debug annotate:informative
+  cat:informative complete:informative diff:informative help:informative
+  list:informative log:informative ls:informative show_conflicts:informative
+  status:informative cert:key+cert chkeypass:key+cert dropkey:key+cert
+  genkey:key+cert trusted:key+cert pull:network push:network serve:network
+  sync:network privkey:packet\ i/o pubkey:packet\ i/o read:packet\ i/o
+  cvs_import:rcs approve:review comment:review disapprove:review tag:review
+  testresult:review checkout:tree co:tree explicit_merge:tree heads:tree
+  merge:tree merge_into_dir:tree migrate_workspace:tree propagate:tree
+  refresh_inodeprints:tree setup:tree set:vars unset:vars add:workspace
+  attr:workspace ci:workspace commit:workspace drop:workspace mv:workspace
+  pivot_root:workspace pluck:workspace rename:workspace revert:workspace
+  rm:workspace update:workspace
+)
 
 _arguments \
   '--brief[print a brief version of the normal output]' \
@@ -25,17 +39,5 @@ _arguments \
   '--ticker[set ticker style]:ticker style:(count dot none)' \
   '--version[print version number, then exit]' \
   '(-@ --xargs)'{-@,--xargs}'[insert command line arguments taken from the given file]:file:_files' \
-  '*:command:->cmd' && return 0
-
-case "$state" in
-  (cmd)
-  if (( CURRENT == 2 )); then
-    cmds=(automate:automation db:database fdiff:debug fload:debug fmerge:debug get_roster:debug identify:debug rcs_import:debug annotate:informative cat:informative complete:informative diff:informative help:informative list:informative log:informative ls:informative show_conflicts:informative status:informative cert:key+cert chkeypass:key+cert dropkey:key+cert genkey:key+cert trusted:key+cert pull:network push:network serve:network sync:network privkey:packet\ i/o pubkey:packet\ i/o read:packet\ i/o cvs_import:rcs approve:review comment:review disapprove:review tag:review testresult:review checkout:tree co:tree explicit_merge:tree heads:tree merge:tree merge_into_dir:tree migrate_workspace:tree propagate:tree refresh_inodeprints:tree setup:tree set:vars unset:vars add:workspace attr:workspace ci:workspace commit:workspace drop:workspace mv:workspace pivot_root:workspace pluck:workspace rename:workspace revert:workspace rm:workspace update:workspace)
-    _describe -t commands 'cmds' cmds && ret=0
-  else
-    _files
-  fi
-  ;;
-esac
-
-return ret
+  '1:command: _describe -t commands command cmds' \
+  '*:file:_files'