about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_apm78
-rw-r--r--Completion/Unix/Command/_arping36
-rw-r--r--Completion/Unix/Command/_cvs370
-rw-r--r--Completion/Unix/Command/_fakeroot11
-rw-r--r--Completion/Unix/Command/_fsh36
-rw-r--r--Completion/Unix/Command/_global68
-rw-r--r--Completion/Unix/Command/_global_tags9
-rw-r--r--Completion/Unix/Command/_imagemagick490
-rw-r--r--Completion/Unix/Command/_irssi59
-rw-r--r--Completion/Unix/Command/_mysql_utils158
-rw-r--r--Completion/Unix/Command/_pbm637
-rw-r--r--Completion/Unix/Command/_rar209
-rw-r--r--Completion/Unix/Command/_rsync193
-rw-r--r--Completion/Unix/Command/_slrn35
-rw-r--r--Completion/Unix/Command/_user_admin6
-rw-r--r--Completion/Unix/Command/_vorbis184
16 files changed, 1291 insertions, 1288 deletions
diff --git a/Completion/Unix/Command/_apm b/Completion/Unix/Command/_apm
index 7fb035e8e..efe50d713 100644
--- a/Completion/Unix/Command/_apm
+++ b/Completion/Unix/Command/_apm
@@ -1,51 +1,41 @@
 #compdef apm
 
-if [[ $OSTYPE == linux* ]]
-then
+if [[ $OSTYPE == linux* ]]; then
 
-_arguments -C -s \
-    '(--version)-V[print the apm program and exit immediately]' \
-    '(-V)--version[print the apm program and exit immediately]' \
-    '(--verbose)-v[print information about APM BIOS and Linux APM driver version]' \
-    '(-v)--verbose[print information about APM BIOS and Linux APM driver version]' \
-    '(--minutes)-m[print total minutes remaining instead of using an hh:mm format]' \
-    '(-m)--minutes[print total minutes remaining instead of using an hh:mm format]' \
-    '(--suspend)-s[put the machine into suspend mode if possible]' \
-    '(-s)--suspend[put the machine into suspend mode if possible]' \
-    '(--standby)-S[put the machine into standby mode if possible]' \
-    '(-S)--standby[put the machine into standby mode if possible]' \
-    '(--noignore)-n[tell the system not to ignore system-generated APM message]' \
-    '(-n)--noignore[tell the system not to ignore system-generated APM message]' \
-    '(--ignore)-i[tell the system to ignore system-generated APM message]' \
-    '(-i)--ignore[tell the system to ignore system-generated APM message]'
+  _arguments -s \
+    '(-)'{-V,--version}'[print the apm program version and exit immediately]' \
+    '(-v --verbose)'{-v,--verbose}'[print information about APM BIOS and Linux APM driver version]' \
+    '(-m --minutes)'{-m,--minutes}'[print total minutes remaining instead of using an hh:mm format]' \
+    '(-s --suspend)'{-s,--suspend}'[put the machine into suspend mode if possible]' \
+    '(-S --standby)'{-S,--standby}'[put the machine into standby mode if possible]' \
+    '(-n --noignore)'{-n,--noignore}'[tell the system not to ignore system-generated APM message]' \
+    '(-i --ignore)'{-i,--ignore}'[tell the system to ignore system-generated APM message]' && return
 
-elif [[ $OSTYPE == freebsd* ]]
-then
+elif [[ $OSTYPE == freebsd* ]]; then
 
-_arguments -C \
-     '-a[display AC line status]' \
-     '-b[display battery status]' \
-     '-d[disable/enable display suspension]:bool:' \
-     '-e[disable/enable apm functions]:bool:' \
-     '-h[disable/enable HLT in kernel context switch]:bool:' \
-     '-l[display remaining battery percentage]' \
-     '-r[enable resume wakeup timer]' \
-     '-s[display status of APM support]' \
-     '-t[display estimated remaining battery life in seconds]' \
-     '-Z[transition system into standby mode]' \
-     '-z[suspend the system]'
-
-elif [[ $OSTYPE == openbsd* ]]
-then
-
-_arguments -C \
-     '-z[engage suspend mode]' \
-     '-S[engage stand-by mode]' \
-     '-l[display estimated battery lifetime percentage]' \
-     '-m[display estimated battery lifetime minutes]' \
-     '-b[display battery status]' \
-     '-a[display AC line status]' \
-     '-v[verbose]' \
-     '-f[socket]:sockname:_files'
+  _arguments \
+    '-a[display AC line status]' \
+    '-b[display battery status]' \
+    '-d[disable/enable display suspension]:bool:' \
+    '-e[disable/enable apm functions]:bool:' \
+    '-h[disable/enable HLT in kernel context switch]:bool:' \
+    '-l[display remaining battery percentage]' \
+    '-r[enable resume wakeup timer]' \
+    '-s[display status of APM support]' \
+    '-t[display estimated remaining battery life in seconds]' \
+    '-Z[transition system into standby mode]' \
+    '-z[suspend the system]' && return
 
+elif [[ $OSTYPE == openbsd* ]]; then
+  _arguments \
+    '-z[engage suspend mode]' \
+    '-S[engage stand-by mode]' \
+    '-l[display estimated battery lifetime percentage]' \
+    '-m[display estimated battery lifetime minutes]' \
+    '-b[display battery status]' \
+    '-a[display AC line status]' \
+    '-v[verbose]' \
+    '-f[socket]:sockname:_files' && return
 fi
+
+return 1
diff --git a/Completion/Unix/Command/_arping b/Completion/Unix/Command/_arping
index 89bdccd92..382ce247e 100644
--- a/Completion/Unix/Command/_arping
+++ b/Completion/Unix/Command/_arping
@@ -1,20 +1,22 @@
 #compdef arping
 
 _arguments -s \
-	'-h[help]' \
-	'-q[quiet]' \
-	'-v[verbose]' \
-	'-r[raw]' \
-	'-R[Raw]' \
-	'-d[find duplicate replies]' \
-	'-B[255.255.255.255]' \
-	'-0[source 0.0.0.0]' \
-	'-b[source 255.255.255.255]' \
-	'-S[set source IP]:source IP address:_hosts' \
-	'-T[target IP]:target IP address:_hosts' \
-        '-p[promiscuous mode]' \
-	'-s[set source MAC address]:source MAC address:' \
-	'-t[set target MAC address]:target MAC address:' \
-	'-c[send this many requests]:count:' \
-	'-i[interface]:interface:' \
-	':address:_hosts' \
+  '(-)-h[display help information]' \
+  '-q[only display error messages]' \
+  '-a[audible ping]' \
+  '*-v[verbose output]' \
+  '-r[raw output: only the MAC/IP address displayed]' \
+  '-R[like -r but shows "the other one"]' \
+  '-d[find duplicate replies]' \
+  '(:)-B[255.255.255.255]' \
+  '-0[source 0.0.0.0]' \
+  '-b[source 255.255.255.255]' \
+  '-S[set source IP]:source IP address:_hosts' \
+  '-T[target IP]:target IP address:_hosts' \
+  '-p[turn on promiscuous mode]' \
+  '-s[set source MAC address]:source MAC address' \
+  '-t[set target MAC address]:target MAC address' \
+  '-c[send this many requests]:count' \
+  '-i[interface]:interface' \
+  '-A[only count addresses matching requested address]' \
+  '(-B):address:_hosts' \
diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs
index 9ad057b68..b687f9874 100644
--- a/Completion/Unix/Command/_cvs
+++ b/Completion/Unix/Command/_cvs
@@ -2,7 +2,7 @@
 
 # redefine _cvs.
 
-_cvs () {
+_cvs() {
   local extra
 
   # "+Qqrwtnlvb:T:e:d:Hfz:s:xa"
@@ -24,60 +24,58 @@ _cvs () {
     '-t[trace]' \
     '(-r)-w[make new working file read-write]' \
     '-x[encrypt client/server communication]' \
-    '(--version)-v[print version]' \
-    '(-v)--version[print version]' \
-    '(   --help --help-commands --help-synonyms --help-options)-H[print help]' \
-    '(-H        --help-commands --help-synonyms --help-options)--help[print help]' \
-    '(-H --help                 --help-synonyms --help-options)--help-commands[command help]' \
-    '(-H --help --help-commands                 --help-options)--help-synonyms[command synonyms help]' \
-    '(-H --help --help-commands --help-synonyms               )--help-options[global options help]' \
+    '(-)'{-v,--version}'[print version and copyright information]' \
+    '(-)'{-H,--help}'[print help information]' \
+    '(-)--help-commands[command help]' \
+    '(-)--help-synonyms[command synonyms help]' \
+    '(-)--help-options[global options help]' \
     '*--allow-root=[allowable root for pserver]:rootdir:_files -/' \
-    '-b+[binary directory]:bindir:_cvs_bindir' \
     '-T+[temporary directory]:temporary directory:_cvs_tempdir' \
     '-d+[cvs root directory]:cvsroot:_cvs_root' \
     '-e+[editor]:editor:_cvs_editor' \
     '-s+[user variable]:user variable:_cvs_user_variable' \
-    '-z+[gzip level]:gzip level:_cvs_gzip_level' \
+    '-z+[gzip level]:gzip level:(0 1 2 3 4 5 6 7 8 9)' \
     '*::cvs command:_cvs_command'
 }
 
 # define cvs command dispatch function.
 
 (( $+functions[_cvs_command] )) ||
-_cvs_command () {
-  local cmd cvsroot="$CVSROOT"
+_cvs_command() {
+  local cmd cvsroot="$CVSROOT" ret=1
   [[ -f CVS/Root ]] && cvsroot="$(<CVS/Root)"
   [[ -n "$opt_args[-d]" ]] && cvsroot=${(e)~opt_args[-d]:Q}
 
-  if (( ! $+_cvs_cmds )); then
-    typeset -gA _cvs_cmds
-    _cvs_cmds=(
-      ${(f)${(F)${${(M)${(f)"$(_call_program commands cvs --help-commands 2>&1)"}:# *}/(#b) #([a-z]##) */$match[1]
- }}}
-      ${(f)${(F)${${(M)${(f)"$(_call_program synonyms cvs --help-synonyms 2>&1)"}:# *}/(#b) #([a-z]#)   #([a-z]#) ([a-z]#)/$match[1]
- $match[2] $match[3] }}}
-    )
+  if (( ! $+_cvs_syns )); then
+    typeset -gA _cvs_syns
+    _cvs_syns=( ${(s. .)${(f)"$(cvs --help-synonyms 2>&1)"}[2,-2]/(#b) #([a-z]#)   #([a-z]#) ([a-z]#)/$match[1] $match[2]:$match[3]} )
   fi
 
+  (( $+_cvs_cmds )) || _cvs_cmds=(
+    ${${(f)"$(_call_program commands cvs --help-commands 2>&1)"}[2,-2]/(#b) #([a-z]##) #([A-Z])/$match[1]:${match[2]:l}}
+    'version:display cvs version being used on client and server'
+  )
+
   if (( CURRENT == 1 )); then
-    _tags commands && { compadd "$@" -k _cvs_cmds || compadd "$@" ${(kv)=_cvs_cmds} }
+    _describe -t commands 'cvs command' _cvs_cmds || compadd "$@" - ${(s.:.)${(j.:.)_cvs_syns}}
   else
     local curcontext="$curcontext"
 
-    cmd="${${(k)_cvs_cmds[(R)* $words[1] *]}:-${(k)_cvs_cmds[(i)$words[1]]}}"
+    cmd="${${_cvs_cmds[(r)$words[1]:*]%%:*}:-${(k)_cvs_syns[(r)(*:|)$words[1](:*|)]}}"
     if (( $#cmd )); then
       curcontext="${curcontext%:*:*}:cvs-${cmd}:"
-      _cvs_$cmd
+      _call_function ret _cvs_$cmd || _message 'no more arguments'
     else
       _message "unknown cvs command: $words[1]"
     fi
+    return ret
   fi
 }
 
 # define completion functions for each cvs command
 
 (( $+functions[_cvs_add] )) ||
-_cvs_add () {
+_cvs_add() {
   # "+k:m:"
   _arguments -s \
     '-k+[keyword]:keyword substitution:_cvs_k' \
@@ -86,7 +84,7 @@ _cvs_add () {
 }
 
 (( $+functions[_cvs_admin] )) ||
-_cvs_admin () {
+_cvs_admin() {
   # "+ib::c:a:A:e::l::u::LUn:N:m:o:s:t::IqxV:k:"
   _arguments -s \
     -{i,x} \
@@ -95,25 +93,25 @@ _cvs_admin () {
     '-I[interactive]' \
     '-q[quiet]' \
     '-b-[default branch]:default branch:(1.1.1)' \
-    '-c+:comment leader (not used):' \
-    '-a+:login names (not work with CVS):' \
-    '-A+:access list to append (not work with CVS):' \
-    '-e-:access list to erase (not work with CVS):' \
-    '-l-[lock]:revision to lock:' \
-    '-u-[unlock]:revision to unlock:' \
-    '-n+[name revision]:symbolic-name(\:revision):' \
-    '-N+[force to name revision]:symbolic-name(\:revision):' \
-    '-m+[replace log]:revision\:msg:' \
-    '-o+[delete revision]:range to delete:' \
-    '-s+[replace state attribute]:state(\:revision):' \
+    '-c+:comment leader (not used)' \
+    '-a+:login names (not work with CVS)' \
+    '-A+:access list to append (not work with CVS)' \
+    '-e-:access list to erase (not work with CVS)' \
+    '-l-[lock]:revision to lock' \
+    '-u-[unlock]:revision to unlock' \
+    '-n+[name revision]:symbolic-name(\:revision)' \
+    '-N+[force to name revision]:symbolic-name(\:revision)' \
+    '-m+[replace log]:revision\:msg' \
+    '-o+[delete revision]:range to delete' \
+    '-s+[replace state attribute]:state(\:revision)' \
     '-t-[replace descriptive text]:descriptive text:_cvs_admin_t' \
-    '-V+:version (obsolete):' \
+    '-V+:version (obsolete)' \
     '-k+[set keyword substitution]:keyword substitution:_cvs_k' \
     '*:file:_cvs_files'
 }
 
 (( $+functions[_cvs_admin_t] )) ||
-_cvs_admin_t () {
+_cvs_admin_t() {
   if compset -P -; then
     _message -e descriptions 'descriptive text'
   else
@@ -122,7 +120,7 @@ _cvs_admin_t () {
 }
 
 (( $+functions[_cvs_annotate] )) ||
-_cvs_annotate () {
+_cvs_annotate() {
   # "+lr:D:fR"
   _arguments -s \
     "(-R)-l[don't recurse]" \
@@ -134,7 +132,7 @@ _cvs_annotate () {
 }
 
 (( $+functions[_cvs_rannotate] )) ||
-_cvs_rannotate () {
+_cvs_rannotate() {
   # "+lr:D:fR"
   _arguments -s \
     "(-R)-l[don't recurse]" \
@@ -146,7 +144,7 @@ _cvs_rannotate () {
 }
 
 (( $+functions[_cvs_checkout] )) ||
-_cvs_checkout () {
+_cvs_checkout() {
   # "+ANnk:d:flRpQqcsr:D:j:P"
   _arguments -s \
     '-N[don'\''t shorten module paths]' \
@@ -167,7 +165,7 @@ _cvs_checkout () {
 }
 
 (( $+functions[_cvs_commit] )) ||
-_cvs_commit () {
+_cvs_commit() {
   # "+nlRm:fF:r:"
   _arguments -s \
     '-n[disable module program]' \
@@ -181,7 +179,7 @@ _cvs_commit () {
 }
 
 (( $+functions[_cvs_diff] )) ||
-_cvs_diff () {
+_cvs_diff() {
   local of ofwuc ouc oss ofwy ofwg ofwl
   # output formats
   of="-y --side-by-side -n --rcs -e -f --ed -q --brief -c -C --context -u -U \
@@ -220,83 +218,59 @@ _cvs_diff () {
     "(-R)-l[don't recurse]" \
     '(-l)-R[recursive]' \
     '-k+[keyword]:keyword substitution:_cvs_k' \
-    '(-r)-D+[specify date]:date:_cvs_D' \
-    '(-r)-D+[specify date]:date:_cvs_D' \
-    '(-D)-r+[specify revision]:tag:_cvs_revisions' \
-    '(-D)-r+[specify revision]:tag:_cvs_revisions' \
+    {,}'(-r)-D+[specify date]:date:_cvs_D' \
+    {,}'(-D)-r+[specify revision]:tag:_cvs_revisions' \
     -{h,0,1,2,3,4,5,6,7,8,9} \
     '--binary[binary mode]' \
-    '--ifdef=[set macro name for merged if-then-else format]:name:' \
-    '(-i)--ignore-case[case insensitive]' \
-    '(--ignore-case)-i[case insensitive]' \
-    '(-w)--ignore-all-space[ignore all white space]' \
-    '(--ignore-all-space)-w[ignore all white space]' \
-    '(-b)--ignore-space-change[ignore changes in the amount of white space]' \
-    '(--ignore-space-change)-b[ignore changes in the amount of white space]' \
-    '(-B)--ignore-blank-lines[ignore lines that are all blank]' \
-    '(--ignore-blank-lines)-B[ignore lines that are all blank]' \
-    '(-I)--ignore-matching-lines=[ignore lines that match regex]:line exclusion regex:' \
-    '(--ignore-matching-lines)-I+[ignore lines that match regex]:line exclusion regex:' \
-    '(-a)--text[treat all files as text]' \
-    '(--text)-a[treat all files as text]' \
-    "($of $oss)--context=-[context diff]:number of lines of copied context:" \
-    "($of $oss)-C+[output a context diff]:number of lines of copied context:" \
+    '--ifdef=[set macro name for merged if-then-else format]:name' \
+    '(-i --ignore-case)'{-i,--ignore-case}'[case insensitive]' \
+    '(-w --ignore-all-space)'{-w,--ignore-all-space}'[ignore all white space]' \
+    '(-b --ignore-space-change)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
+    '(-B --ignore-blank-lines)'{-B,--ignore-blank-lines}'[ignore lines that are all blank]' \
+    '(-I --ignore-matching-lines)'{-I+,--ignore-matching-lines=}'[ignore lines that match regex]:line exclusion regex' \
+    '(-a --text)'{-a,--text}'[treat all files as text]' \
+    "($of $oss)"{-C+,--context=-}'[context diff; specify lines of context]:number of lines of context' \
     "($of $oss)-c[output a context diff]" \
-    "($of $oss)--unified=-[output a unified diff]:number of lines of unified context:" \
-    "($of $oss)-U+[output a unified diff]:number of lines of unified context:" \
+    "($of $oss)"{-U+,--unified=-}'[unified diff; specify lines of context]:number of lines of context' \
     "($of $oss)-u[output a unified diff]" \
-    "($ofwuc $oss -L)--label=[set label to use instead of file name]:label:" \
-    "($ofwuc $oss --label)-L+[set label to use instead of file name]:label:" \
-    "($ofwuc $oss -L)--label=[set label to use instead of file name]:label:" \
-    "($ofwuc $oss --label)-L+[set label to use instead of file name]:label:" \
-    "($ofwuc $oss -p)--show-c-function[show C function of each change]" \
-    "($ofwuc $oss --show-c-function)-p[show C function of each change]" \
-    "($ofwuc $oss -F)--show-function-line=[show the most recent line matching regex]:regex:" \
-    "($ofwuc $oss --show-function-line)-F+[show the most recent line matching regex]:regex:" \
+    {,}"($ofwuc $oss -L --label)"{-L+,--label=}'[set label to use instead of file name]:label' \
+    "($ofwuc $oss -p --show-c-function)"{-p,--show-c-function}'[show C function of each change]' \
+    "($ofwuc $oss -F --show-function-line=)"{-F+,--show-function-line=}'[show the most recent line matching regex]:regex' \
     "($of $ouc $oss)--brief[output only whether files differ]" \
-    "($of $ouc $oss)--ed[output an ed script]" \
-    "($of $ouc $oss)-e[output an ed script]" \
-    "($of $ouc $oss)--forward-ed[output a reversed ed script]" \
-    "($of $ouc $oss)-f[output a reversed ed script]" \
-    "($of $ouc $oss)--rcs[RCS format diff]" \
-    "($of $ouc $oss)-n[RCS format diff]" \
+    "($of $ouc $oss)"{-e,--ed}'[output an ed script]' \
+    "($of $ouc $oss)"{-f,--forward-ed}'[output a reversed ed script]" \
+    "($of $ouc $oss)"{-n,--rcs}'[RCS format diff]" \
     "($of $ouc)--side-by-side[output in two columns]" \
     "($of $ouc)-y[output in two columns]" \
-    "($ofwy $ouc -W)--width=[set size of line]:number of characters per line:" \
-    "($ofwy $ouc --width)-W+[set size of line]:number of characters per line:" \
+    "($ofwy $ouc -W --width)"{-W+,--width=}'[set size of line]:number of characters per line' \
     "($ofwy $ouc)--left-column[output only left column of common lines]" \
     "($ofwy $ouc)--suppress-common-lines[do not output common lines]" \
-    "($ofwg $ouc $oss)--old-group-format=[set old group format]:old group format:" \
-    "($ofwg $ouc $oss)--new-group-format=[set new group format]:new group format:" \
-    "($ofwg $ouc $oss)--changed-group-format=[set changed group format]:changed group format:" \
-    "($ofwg $ouc $oss)--unchanged-group-format=[set unchanged group format]:unchanged group format:" \
-    "($ofwl $ouc $oss)--line-format=[set line format]:line format:" \
-    "($ofwl $ouc $oss)--old-line-format=[set old line format]:old line format:" \
-    "($ofwl $ouc $oss)--new-line-format=[set new line format]:new line format:" \
-    "($ofwl $ouc $oss)--unchanged-line-format=[set unchanged line format]:unchanged line format:" \
+    "($ofwg $ouc $oss)--old-group-format=[set old group format]:old group format" \
+    "($ofwg $ouc $oss)--new-group-format=[set new group format]:new group format" \
+    "($ofwg $ouc $oss)--changed-group-format=[set changed group format]:changed group format" \
+    "($ofwg $ouc $oss)--unchanged-group-format=[set unchanged group format]:unchanged group format" \
+    "($ofwl $ouc $oss)--line-format=[set line format]:line format" \
+    "($ofwl $ouc $oss)--old-line-format=[set old line format]:old line format" \
+    "($ofwl $ouc $oss)--new-line-format=[set new line format]:new line format" \
+    "($ofwl $ouc $oss)--unchanged-line-format=[set unchanged line format]:unchanged line format" \
     '--paginate[output through pr]' \
-    '(-t)--expand-tabs[expand tabs to spaces]' \
-    '(--expand-tabs)-t[expand tabs to spaces]' \
+    '(-t --expand-tabs)'{-t,--expand-tabs}'[expand tabs to spaces]' \
     '--initial-tab[prepend a tab]' \
-    '(-N)--new-file[treat absent files as empty]' \
-    '(--new-file)-N[treat absent files as empty]' \
-    '(-s)--report-identical-files[report when two files are the same]' \
-    '(--report-identical-files)-s[report when two files are the same]' \
-    '--horizon-lines=[set number of lines to keep in prefix and suffix]:number of horizon lines:' \
-    '(-d)--minimal[try to find a smaller set of changes]' \
-    '(--minimal)-d[try to find a smaller set of changes]' \
-    '(-H)--speed-large-files[assume large files and many small changes]' \
-    '(--speed-large-files)-H[assume large files and many small changes]' \
+    '(-N --new-file)'{-N,--new-file}'[treat absent files as empty]' \
+    '(-s --report-identical-files)'{-s,--report-identical-files}'[report when two files are the same]' \
+    '--horizon-lines=[set number of lines to keep in prefix and suffix]:number of horizon lines' \
+    '(-d --minimal)'{-d,--minimal}'[try to find a smaller set of changes]' \
+    '(-H --speed-large-files)'{-H,--speed-large-files}'[assume large files and many small changes]' \
     '*:file:_cvs_diff_arg'
 }
 
 (( $+functions[_cvs_diff_arg] )) ||
-_cvs_diff_arg () {
+_cvs_diff_arg() {
   _cvs_files_modified || _cvs_files
 }
 
 (( $+functions[_cvs_edit] )) ||
-_cvs_edit () {
+_cvs_edit() {
   # "+lRa:"
   _arguments -s \
     "(-R)-l[don't recurse]" \
@@ -306,7 +280,7 @@ _cvs_edit () {
 }
 
 (( $+functions[_cvs_editors] )) ||
-_cvs_editors () {
+_cvs_editors() {
   # "+lR"
   _arguments -s \
     "(-R)-l[don't recurse]" \
@@ -315,7 +289,7 @@ _cvs_editors () {
 }
 
 (( $+functions[_cvs_export] )) ||
-_cvs_export () {
+_cvs_export() {
   # "+Nnk:d:flRQqr:D:"
   _arguments -s \
     '-N[don'\''t shorten module paths]' \
@@ -331,7 +305,7 @@ _cvs_export () {
 }
 
 (( $+functions[_cvs_history] )) ||
-_cvs_history () {
+_cvs_history() {
   # "+Tacelow?D:b:f:m:n:p:r:t:u:x:X:z:"
   _arguments -s \
     '-T[all tags]' \
@@ -342,22 +316,22 @@ _cvs_history () {
     '-o[check-outed modules]' \
     '-w[working directory]' \
     '-D+[since date]:date:_cvs_D' \
-    '-b+[back to record]:string:' \
+    '-b+[back to record]:string' \
     '-f+[specify file]:file:_cvs_files' \
     '-m+[specify module]:module:_cvs_modules' \
     '*-n+[in module]:module:_cvs_modules' \
-    '*-p+[in repository]:repository:' \
-    '-r+[since revision]:rev:' \
-    '-t+[since tag]:tag:' \
-    '*-u+[specify user]:user name:' \
+    '*-p+[in repository]:repository' \
+    '-r+[since revision]:rev' \
+    '-t+[since tag]:tag' \
+    '*-u+[specify user]:user name' \
     '-x+[specify type]:type:_cvs_history_x' \
-    '-X+[debugging]:arg:' \
-    '-z+[specify timezone]:timezone:' \
+    '-X+[debugging]:arg' \
+    '-z+[specify timezone]:timezone' \
     '*:file:_cvs_files'
 }
 
 (( $+functions[_cvs_history_x] )) ||
-_cvs_history_x () {
+_cvs_history_x() {
   _values -s '' 'type' \
     'F[release]' \
     'O[checkout]' \
@@ -373,7 +347,7 @@ _cvs_history_x () {
 }
 
 (( $+functions[_cvs_import] )) ||
-_cvs_import () {
+_cvs_import() {
   # "+Qqdb:m:I:k:W:"
   _arguments -s \
     '-d[use file modification time]' \
@@ -384,16 +358,11 @@ _cvs_import () {
     '*-W+[wrapper specification]:spec:_files' \
     ':repository:_cvs_modules' \
     ':vendor tag:_cvs_vendor_branches' \
-    ':release tag:'
-}
-
-(( $+functions[_cvs_init] )) ||
-_cvs_init () {
-  false
+    ':release tag'
 }
 
 (( $+functions[_cvs_log] )) ||
-_cvs_log () {
+_cvs_log() {
   # "+bd:hlNRr::s:tw::"
   _arguments -s \
     '-b[default branch]' \
@@ -402,15 +371,15 @@ _cvs_log () {
     '-R[print the name of RCS file in the repository]' \
     '-N[don'\''t list tags]' \
     '(-h)-t[header with descriptive text]' \
-    '-d+[specify dates]:dates:' \
-    '-r-[specify revisions]:revisions:' \
+    '-d+[specify dates]:dates' \
+    '-r-[specify revisions]:revisions' \
     '-s+[specify states]:states:(Exp Stab Rel dead)' \
-    '-w-[specify logins]:logins:' \
+    '-w-[specify logins]:logins' \
     '*:file:_cvs_files'
 }
 
 (( $+functions[_cvs_rlog] )) ||
-_cvs_rlog () {
+_cvs_rlog() {
   # "+bd:hlNRr::s:tw::"
   _arguments -s \
     '-b[default branch]' \
@@ -419,25 +388,15 @@ _cvs_rlog () {
     '(-l)-R[recursive]' \
     '-N[don'\''t list tags]' \
     '(-h)-t[header with descriptive text]' \
-    '-d+[specify dates]:dates:' \
-    '-r-[specify revisions]:revisions:' \
+    '-d+[specify dates]:dates' \
+    '-r-[specify revisions]:revisions' \
     '-s+[specify states]:states:(Exp Stab Rel dead)' \
-    '-w-[specify logins]:logins:' \
+    '-w-[specify logins]:logins' \
     '*:file:_cvs_modules'
 }
 
-(( $+functions[_cvs_login] )) ||
-_cvs_login () {
-  false
-}
-
-(( $+functions[_cvs_logout] )) ||
-_cvs_logout () {
-  false
-}
-
 (( $+functions[_cvs_rdiff] )) ||
-_cvs_rdiff () {
+_cvs_rdiff() {
   # "+V:k:cuftsQqlRD:r:"
   _arguments -s \
     '-c[output a context diff]' \
@@ -446,7 +405,7 @@ _cvs_rdiff () {
     '-s[short patch]' \
     "(-R)-l[don't recurse]" \
     '(-l)-R[recursive]' \
-    '-V+[specify version]:version:' \
+    '-V+[specify version]:version' \
     '-k+[keyword]:keyword substitution:_cvs_k' \
     '(-D -D -r -r)-t[top two differences]' \
     '(-t -r)-D+[specify date]:date:_cvs_D' \
@@ -457,7 +416,7 @@ _cvs_rdiff () {
 }
 
 (( $+functions[_cvs_release] )) ||
-_cvs_release () {
+_cvs_release() {
   # "+Qdq"
   _arguments -s \
     '-d[delete]' \
@@ -465,7 +424,7 @@ _cvs_release () {
 }
 
 (( $+functions[_cvs_remove] )) ||
-_cvs_remove () {
+_cvs_remove() {
   # "+flR"
   _arguments -s \
     '-f[force to remove]' \
@@ -475,7 +434,7 @@ _cvs_remove () {
 }
 
 (( $+functions[_cvs_remove_arg] )) ||
-_cvs_remove_arg () {
+_cvs_remove_arg() {
   if (( $+opt_args[-f] )); then
     _cvs_files
   else
@@ -484,7 +443,7 @@ _cvs_remove_arg () {
 }
 
 (( $+functions[_cvs_rtag] )) ||
-_cvs_rtag () {
+_cvs_rtag() {
   # "+FanfQqlRdbr:D:"
   _arguments -s \
     '(-d)-F[move tag if already exists]' \
@@ -497,12 +456,12 @@ _cvs_rtag () {
     '(-d)-b[create branch]' \
     '-D+[specify date]:date:_cvs_D' \
     '-r+[specify revision]:tag:_cvs_revisions' \
-    ':tag:' \
+    ':tag' \
     '*:module:_cvs_modules'
 }
 
 (( $+functions[_cvs_status] )) ||
-_cvs_status () {
+_cvs_status() {
   # "+vlR"
   _arguments -s \
     '-v[verbose]' \
@@ -512,7 +471,7 @@ _cvs_status () {
 }
 
 (( $+functions[_cvs_tag] )) ||
-_cvs_tag () {
+_cvs_tag() {
   # "+FQqlRcdr:D:bf"
   _arguments -s \
     '(-d)-F[move tag if already exists]' \
@@ -529,7 +488,7 @@ _cvs_tag () {
 }
 
 (( $+functions[_cvs_unedit] )) ||
-_cvs_unedit () {
+_cvs_unedit() {
   # "+lR"
   _arguments -s \
     "(-R)-l[don't recurse]" \
@@ -538,7 +497,7 @@ _cvs_unedit () {
 }
 
 (( $+functions[_cvs_update] )) ||
-_cvs_update () {
+_cvs_update() {
   # "+ApCPflRQqduk:r:D:j:I:W:"
   _arguments -s \
     '-C[overwrite local modification]' \
@@ -559,7 +518,7 @@ _cvs_update () {
 }
 
 (( $+functions[_cvs_watch] )) ||
-_cvs_watch () {
+_cvs_watch() {
   local expl
 
   if (( CURRENT == 2 )); then
@@ -568,39 +527,34 @@ _cvs_watch () {
     case "$words[2]" in
       on|off) # "+lR"
 	_arguments -s \
-	    "(-R)-l[don't recurse]" \
-	    '(-l)-R[recursive]' \
-	    ':watch command:' \
-	    '*:file:_cvs_files'
-	;;
+	  "(-R)-l[don't recurse]" \
+	  '(-l)-R[recursive]' \
+	  ':watch command' \
+	  '*:file:_cvs_files'
+      ;;
       add|remove) # "+lRa:"
 	_arguments -s \
-	    "(-R)-l[don't recurse]" \
-	    '(-l)-R[recursive]' \
-	    '*-a+[specify action]:action:(edit unedit commit all none)' \
-	    ':watch command:' \
-	    '*:file:_cvs_files'
-	;;
+	  "(-R)-l[don't recurse]" \
+	  '(-l)-R[recursive]' \
+	  '*-a+[specify action]:action:(edit unedit commit all none)' \
+	  ':watch command' \
+	  '*:file:_cvs_files'
+      ;;
     esac
   fi
 }
 
 (( $+functions[_cvs_watchers] )) ||
-_cvs_watchers () {
+_cvs_watchers() {
   # "+lR"
   _arguments -s \
-      "(-R)-l[don't recurse]" \
-      '(-l)-R[recursive]' \
-      '*:file:_cvs_files'
-}
-
-(( $+functions[_cvs_version] )) ||
-_cvs_version () {
-  false
+    "(-R)-l[don't recurse]" \
+    '(-l)-R[recursive]' \
+    '*:file:_cvs_files'
 }
 
 (( $+functions[_cvs_loadstat] )) ||
-_cvs_loadstat () {
+_cvs_loadstat() {
   zstyle -t ":completion:${curcontext}:" disable-stat && return 1
   (( $+_cvs_loadstat_status )) && return $_cvs_loadstat_status
 
@@ -610,7 +564,7 @@ _cvs_loadstat () {
 }
 
 (( $+functions[_cvs_root] )) ||
-_cvs_root () {
+_cvs_root() {
   local cvspassfile id slash
 
   typeset -gU _cvs_roots
@@ -636,12 +590,12 @@ _cvs_root () {
 }
 
 (( $+functions[_cvs_tempdir] )) ||
-_cvs_tempdir () {
+_cvs_tempdir() {
   _tags directories && compadd "$@" $TMPPREFIX:h $TMPDIR /tmp
 }
 
 (( $+functions[_cvs_user_variable] )) ||
-_cvs_user_variable () {
+_cvs_user_variable() {
   if compset -P '*='; then
     _default
   else
@@ -651,30 +605,20 @@ _cvs_user_variable () {
 
 # define completion functions for cvs global options.
 
-(( $+functions[_cvs_bindir] )) ||
-_cvs_bindir () {
-  _tags directories && { compadd "$@" /usr/local/bin || _files "$@" -/ }
-}
-
 (( $+functions[_cvs_editor] )) ||
-_cvs_editor () {
+_cvs_editor() {
   _tags commands && compadd "$@" vi
 }
 
-(( $+functions[_cvs_gzip_level] )) ||
-_cvs_gzip_level () {
-  _tags values && compadd "$@" 9
-}
-
 # define completion functions for cvs common options and arguments.
 
 (( $+functions[_cvs_D] )) ||
-_cvs_D () {
+_cvs_D() {
   _tags values && compadd "$@" today yesterday week\ ago month\ ago
 }
 
 (( $+functions[_cvs_k] )) ||
-_cvs_k () {
+_cvs_k() {
   _values 'keyword substitution' \
     'kv[generate keyword strings using the default form]' \
     "kvl[include locker's name in strings if given revision is locked]" \
@@ -685,12 +629,12 @@ _cvs_k () {
 }
 
 (( $+functions[_cvs_m] )) ||
-_cvs_m () {
+_cvs_m() {
   _message -e messages "log message"
 }
 
 (( $+functions[_cvs_modules] )) ||
-_cvs_modules () {
+_cvs_modules() {
   if compset -P '(#m)(*/)'; then
     _cvs_sub_modules "$cvsroot" "${MATCH%/}"
   else
@@ -699,13 +643,13 @@ _cvs_modules () {
 }
 
 (( $+functions[_cvs_top_modules] )) ||
-_cvs_top_modules () {
+_cvs_top_modules() {
   local root="$1"
 
   if [[ -d $root ]]; then
     _wanted modules expl 'module name' \
-        compadd - $root/*(/:t) \
-            ${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ 	]*}
+	compadd - $root/*(/:t) \
+	    ${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ 	]*}
   else
     if [[ "$_cvs_top_modules_cache_key" != "$root" ]]; then
       _cvs_top_modules_cache_key="$root"
@@ -722,7 +666,7 @@ _cvs_top_modules () {
     fi
     if (( $#_cvs_top_modules_cache_mods )); then
       _wanted modules expl 'module name' \
-        compadd -a _cvs_top_modules_cache_mods
+	compadd -a _cvs_top_modules_cache_mods
     else
       _message -e modules 'module name'
     fi
@@ -730,7 +674,7 @@ _cvs_top_modules () {
 }
 
 (( $+functions[_cvs_sub_modules] )) ||
-_cvs_sub_modules () {
+_cvs_sub_modules() {
   local root="$1" dir="$2" ignore
 
   if [[ -d $root ]]; then
@@ -746,7 +690,7 @@ _cvs_sub_modules () {
     fi
     if (( $#_cvs_sub_modules_cache_mods )); then
       _wanted modules expl 'module name' \
-        compadd -qS/ -a _cvs_sub_modules_cache_mods
+	compadd -qS/ -a _cvs_sub_modules_cache_mods
     else
       _message -e modules 'module name'
     fi
@@ -755,7 +699,7 @@ _cvs_sub_modules () {
 
 # _cvs_run cvsroot directory cvs-arguments...
 (( $+functions[_cvs_run] )) ||
-_cvs_run () {
+_cvs_run() {
   local cvsroot="$1" dir="$2"
   shift 2
   local d=/tmp/zsh-cvs-work-$$
@@ -772,7 +716,7 @@ _cvs_run () {
 
 # _cvs_remote_directories cvsroot directory [variable]
 (( $+functions[_cvs_remote_directories] )) ||
-_cvs_remote_directories () {
+_cvs_remote_directories() {
   local root="$1" dir="$2" subdirs
   shift 2
   subdirs=(${${(M)${(f)"$(_call_program directories _cvs_run "$root" "$dir" update -r00 -d -p 2>&1)"}:#* New directory \`*\' -- ignored}/(#b)*\`(*)\'*/$match[1]})
@@ -786,7 +730,7 @@ _cvs_remote_directories () {
 }
 
 (( $+functions[_cvs_vendor_branches] )) ||
-_cvs_vendor_branches () {
+_cvs_vendor_branches() {
   local expl vendor_branch
   vendor_branch=()
   if zstyle -T ":completion:${curcontext}:" remote-access; then
@@ -806,7 +750,7 @@ _cvs_vendor_branches () {
 
 # _cvs_extract_vendor_branch [-b numeric-branch] cvsroot directory [variable]
 (( $+functions[_cvs_extract_vendor_branch] )) ||
-_cvs_extract_vendor_branch () {
+_cvs_extract_vendor_branch() {
   local numeric='1\.1\.1'
   if [[ $1 = -b ]]; then
     numeric="${2//./\\.}"
@@ -841,7 +785,7 @@ q
 }
 
 (( $+functions[_cvs_revisions] )) ||
-_cvs_revisions () {
+_cvs_revisions() {
   local expl
 
   if [[ $_cvs_revisions_key != $cvsroot:$PWD ]]; then
@@ -850,7 +794,7 @@ _cvs_revisions () {
       _cvs_revisions_cache=(
 	$(CVS_IGNORE_REMOTE_ROOT= _call_program tags cvs -d "$cvsroot" -q status -vl .|
 	  sed -n -e '/No Tags Exist/d' \
-	         -e 's/^	\([A-Za-z][-_0-9A-Za-z]*\).*/\1/p'|
+		 -e 's/^	\([A-Za-z][-_0-9A-Za-z]*\).*/\1/p'|
 	  sort|uniq)
       )
     else
@@ -868,7 +812,7 @@ _cvs_revisions () {
 # define completion functions for files maintained by cvs.
 
 (( $+functions[_cvs_files] )) ||
-_cvs_files () {
+_cvs_files() {
   _alternative \
     'directories:directory:_cvs_existing_directories' \
     'existing-files:file:_cvs_existing_entries' \
@@ -876,7 +820,7 @@ _cvs_files () {
 }
 
 (( $+functions[_cvs_files_modified] )) ||
-_cvs_files_modified () {
+_cvs_files_modified() {
   _alternative \
     'directories:directory:_cvs_existing_directories' \
     'existing-files:file:_cvs_modified_entries' \
@@ -884,28 +828,28 @@ _cvs_files_modified () {
 }
 
 (( $+functions[_cvs_files_removed] )) ||
-_cvs_files_removed () {
+_cvs_files_removed() {
   _alternative \
     'directories:directory:_cvs_existing_directories' \
     'removed-files:removed file:_cvs_nonexistent_entries'
 }
 
 (( $+functions[_cvs_files_unmaintained] )) ||
-_cvs_files_unmaintained () {
+_cvs_files_unmaintained() {
   _cvs_nonentried_files ||
   _cvs_existing_directories ||
   _cvs_strict_nonentried_files
 }
 
 (( $+functions[_cvs_existing_directories] )) ||
-_cvs_existing_directories () {
+_cvs_existing_directories() {
   local expl
   _wanted directories expl directory _path_files -g "*~(*/|)CVS(/)" ||
   _cvs_path_prefixes
 }
 
 (( $+functions[_cvs_existing_entries] )) ||
-_cvs_existing_entries () {
+_cvs_existing_entries() {
   local expl match linedir realdir pat
   match=()
   : ${PREFIX:#(#b)(*/)(*)}
@@ -917,7 +861,7 @@ _cvs_existing_entries () {
 }
 
 (( $+functions[_cvs_modified_entries] )) ||
-_cvs_modified_entries () {
+_cvs_modified_entries() {
   if _cvs_loadstat; then
     local expl match linedir realdir pat slash=/
     match=()
@@ -941,7 +885,7 @@ _cvs_ignore_default=(
 )
 
 (( $+functions[_cvs_strict_nonentried_files] )) ||
-_cvs_strict_nonentried_files () {
+_cvs_strict_nonentried_files() {
   local expl match linedir realdir omitpats
 
   match=()
@@ -953,15 +897,15 @@ _cvs_strict_nonentried_files () {
       ${${${${(M)${(f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH}
     )
     if (( $#omitpats )); then
-    	_path_files -g "*~(*/|)(${(j:|:)~omitpats})(D.)"
+      _path_files -g "*~(*/|)(${(j:|:)~omitpats})(D.)"
     else
-    	_path_files -g "*~(*/|)(D.)"
+      _path_files -g "*~(*/|)(D.)"
     fi
   }
 }
 
 (( $+functions[_cvs_nonentried_files] )) ||
-_cvs_nonentried_files () {
+_cvs_nonentried_files() {
   local expl match linedir realdir omitpats
 
   match=()
@@ -983,7 +927,7 @@ _cvs_nonentried_files () {
 }
 
 (( $+functions[_cvs_nonexistent_entries] )) ||
-_cvs_nonexistent_entries () {
+_cvs_nonexistent_entries() {
   local expl match linedir realdir files
   match=()
   : ${PREFIX:#(#b)(*/)(*)}
@@ -1000,7 +944,7 @@ _cvs_nonexistent_entries () {
 }
 
 (( $+functions[_cvs_path_prefixes] )) ||
-_cvs_path_prefixes () {
+_cvs_path_prefixes() {
   local expl match
   match=()
   [[ "$PREFIX$SUFFIX" = (#b)(*)(/[^/]#) ]] && {
diff --git a/Completion/Unix/Command/_fakeroot b/Completion/Unix/Command/_fakeroot
index bb9655a85..f7a298cf2 100644
--- a/Completion/Unix/Command/_fakeroot
+++ b/Completion/Unix/Command/_fakeroot
@@ -1,7 +1,10 @@
 #compdef fakeroot
 
 _arguments \
-       '--lib[alternate wrapper library]:wrapper library:_files' \
-       '--faked[alternate faked binary]:fake binary: _command_names -e' \
-       '(-):command name: _command_names -e'  \
-       '*::arguments: _normal'
+  '(-l --lib)'{-l,--lib}'[specify alternate wrapper library]:wrapper library:_files' \
+  '--faked[specify alternate faked binary]:fake binary:_command_names -e' \
+  '-s[save the fakeroot environment on exit]:save file:_files' \
+  '-i[load a previously saved environment]:file:_files' \
+  '(-u --unknown-is-real)'{-u,--unknown-is-real}'[use real ownership of previously unknown files]' \
+  '(-):command name:_command_names -e'  \
+  '*::arguments:_normal'
diff --git a/Completion/Unix/Command/_fsh b/Completion/Unix/Command/_fsh
index a3ca0321a..d9ced5feb 100644
--- a/Completion/Unix/Command/_fsh
+++ b/Completion/Unix/Command/_fsh
@@ -1,25 +1,21 @@
 #compdef fsh
 
-local curcontext="$curcontext" state line
+local curcontext="$curcontext" state line ret=1
 
 _arguments -C \
-	'(--help)-h[help]' \
-	'(-h)--help' \
-	'(--version)-V[version]' \
-	'(-V)--version' \
-	'-r[method]:method:(rsh ssh)' \
-        '-l[login]:login:_users' \
-	'(--timeout)-T:idle timeout:' \
-	'(-T)--timeout:idle timeout:' \
-        ':remote host name:_hosts' \
-        '(-):command: _command_names -e' \
-        '*::args:->command' && return 0
+  '(- : *)'{-h,--help}'[display help information]' \
+  '(- : *)'{-V,--version}'[display version information]' \
+  '-r[specify method]:method:(rsh ssh)' \
+  '-l[specify login id]:login:_users' \
+  '(-T --timeout)'{-T,--timeout}':idle timeout:' \
+  ':remote host name:_hosts' \
+  '(-):command: _command_names -e' \
+  '*::args:->command' && ret=0
 
-case "$state" in
-      command)
-        shift 1 words
-        (( CURRENT-- ))
-        _normal
-        return
-        ;;
-esac
+if [[ -n "$state" ]]; then
+  shift 1 words
+  (( CURRENT-- ))
+  _normal && ret=0
+fi
+
+return ret
diff --git a/Completion/Unix/Command/_global b/Completion/Unix/Command/_global
index cbf8a7179..bb6f7a0fa 100644
--- a/Completion/Unix/Command/_global
+++ b/Completion/Unix/Command/_global
@@ -1,45 +1,29 @@
 #compdef global
 
+local cmds="(-c --completion -f --file -g --grep -I --idutils -p --print-dbpath -P --path -u --update --version --help)"
+
 _arguments \
-	'(--completion)-c[completion on prefix]:prefix:' \
-	'(-c)--completion:prefix:' \
-	'(--file)-f[print function definitions in file]' \
-	'(-f)--file' \
-	'(--grep)-g[print all lines which match pattern using grep]:pattern' \
-	'(-g)--grep' \
-	'(--idutils)-I[print all lines which match pattern using id-utils]:pattern' \
-	'(-I)--idutils' \
-	'(--print-dbpath)-p[print location of GTAGS]' \
-	'(-p)--print-dbpath' \
-	'(--path)-P[print paths matching pattern]:pattern:' \
-	'(-P)--path' \
-	'(--update)-u[locate tag files and update incrementally]' \
-	'(-u)--update' \
-	'(--absolute)-a[print absolute path names]' \
-	'(-a)--absolute' \
-	'(--ignore-case)-i[ignore case in patterns]' \
-	'(-i)--ignore-case' \
-	'(--local)-l[print just objects which exist under the current directory]' \
-	'(-l)--local' \
-	'(--nofilter)-n[suppress sort filter and path conversion filter]' \
-	'(-n)--nofilter' \
-	'(--other)-o[search in other files, not just source files (with -g)]' \
-	'(-o)--other' \
-	'(--quiet)-q[quiet mode]' \
-	'(-q)--quiet' \
-	'(--reference --rootdir)-r[find object references instead of definitions]' \
-	'(-r --rootdir)--rereference' \
-	'(-r --reference)--rootdir' \
-	'(--symbol)-s[find symbols instead of function names]:pattern:' \
-	'(-s)--symbol' \
-	'(--tags)-t[output in standard ctags format]' \
-	'(-t)--tags' \
-	'(--through -s -r -l)-T[search through all tag files in GTAGSLIBPATH]' \
-	'(-T -s -r -l)--through' \
-	'(--verbose)-v[verbose mode]' \
-	'(-v)--verbose' \
-	'(--cxref)-x[in addition to default output, list line number and contents]' \
-	'(-x)--cxref' \
-	'--version:show version number:' \
-	'--help:show help:' \
-	':word:_global_tags'
+  "$cmds"{-c,--completion}'[completion on prefix]:prefix:' \
+  "$cmds"{-f,--file}'[print function definitions in file]' \
+  "$cmds"{-g,--grep}'[print all lines which match pattern using grep]:pattern' \
+  "$cmds"{-I,--idutils}'[print all lines which match pattern using id-utils]:pattern' \
+  "$cmds"{-p,--print-dbpath}'[print location of GTAGS]' \
+  "$cmds"{-P,--path}'[print paths matching pattern]:pattern:' \
+  "$cmds"{-u,--update}'[locate tag files and update incrementally]' \
+  '(-a --absolute)'{-a,--absolute}'[print absolute path names]' \
+  '(-e --regexp :)'{-e,--regexp}'[specify pattern]:pattern:_global_tags' \
+  '(-G --basic-regexp :)'{-G,--basic-regexp}'[specify basic regexp to use]:word:_global_tags' \
+  '(-i --ignore-case)'{-i,--ignore-case}'[ignore case in patterns]' \
+  '(-l --local)'{-l,--local}'[print just objects which exist under the current directory]' \
+  '(-n --nofilter)'{-n,--nofilter}'[suppress sort filter and path conversion filter]' \
+  '(-o --other)'{-o,--other}'[search in other files, not just source files (with -g)]' \
+  '(-q --quiet)'{-q,--quiet}'[quiet mode]' \
+  '(-r --reference --rootdir)'{-r,--reference,--rootdir}'[find object references instead of definitions]' \
+  '(-s --symbol)'{-s,--symbol}'[find symbols instead of function names]:pattern' \
+  '(-t --tags)'{-t,--tags}'[output in standard ctags format]' \
+  '(-T --through -s -r -l)'{-T,--through}'[search through all tag files in GTAGSLIBPATH]' \
+  '(-v --verbose)'{-v,--verbose}'[verbose mode]' \
+  '(-x --cxref)'{-x,--cxref}'[additionally list line number and contents]' \
+  '(- :)--version[display version information]' \
+  '(- :)--help[display help information]' \
+  ':word:_global_tags'
diff --git a/Completion/Unix/Command/_global_tags b/Completion/Unix/Command/_global_tags
index bdd01baf6..9f7abdfa5 100644
--- a/Completion/Unix/Command/_global_tags
+++ b/Completion/Unix/Command/_global_tags
@@ -1,9 +1,4 @@
 #autoload
 
-local globalresults
-
-[[ -z $words[CURRENT] ]] && return 1
-
-globalresults=($(global --completion $words[CURRENT]))
-
-compadd -M 'm:{a-zA-Z}={A-Za-z}' -a "$@" - globalresults
+_wanted global-tags expl 'tag' compadd -M 'm:{a-zA-Z}={A-Za-z}' \
+    -a "$@" - $(_call_program global-tags global --completion $PREFIX)
diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick
index eac3a2bf7..fd9780ad7 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -1,4 +1,4 @@
-#compdef display animate import identify montage convert combine mogrify xtp
+#compdef animate composite combine convert display identify import mogrify montage xtp
 
 local state line expl formats curcontext="$curcontext"
 typeset -A opt_args
@@ -19,227 +19,309 @@ if (( $# )); then
 fi
 
 case "$service" in
-display)
-  _arguments -M 'm:{a-z}={A-Z}' \
+  display)
+    _arguments -M 'm:{a-z}={A-Z}' \
       '*-backdrop[use full screen]' \
-      '*-border:border size (<width>x<height>):' \
-      '*-colormap:colormap type:(Shared Private)' \
-      '*-colors:preferred number of colors:' \
+      '*-background:color:_x_color' \
+      '*-border:border size (<width>x<height>)' \
+      '*-bordercolor:color:_x_color' \
+      '*-borderwidth:geometry' \
+      '*-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '*-colormap:colormap type:(shared private)' \
+      '*-colors:preferred number of colors' \
       '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '*-comment:comment string:' \
+      '*-comment:comment string' \
       '*-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
       '*-contrast[enhance contrast]' \
       '*+contrast[reduce contrast]' \
-      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '*-delay:delay for next image (1/100ths of a second):' \
-      '*-density:resolution in pixels of image (<width>x<height>):' \
+      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \
+      '*-debug' \
+      '*-delay:delay for next image (1/100ths of a second)' \
+      '*-density:image resolution (<width>x<height> in pixels)' \
       '*-despeckle[reduce speckles in image]' \
       '*-display:display:_x_display' \
       '*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
       '*-dither[apply dithering]' \
-      '*-edge:edge detection factor (0.0 - 99.9%):' \
+      '*-edge:edge detection factor (0.0 - 99.9%%)' \
+      '*-endian:image endianess:(MSB LSB)' \
+      '*+endian' \
       '*-enhance[enhance noisy image]' \
       '*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
       '*-flip[vertical mirror image]' \
       '*-flop[horizontal mirror image]' \
+      '*-font:_x_font' \
+      '*-foreground:color:_x_color' \
       '*-frame:border dimensions (<width>x<height>+<out>+<in>)' \
-      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
+      '(- *)-help[display help information]' \
+      '*-iconGeometry:geometry:_x_geometry' \
+      '*-iconic' \
       '*-immutable[disallow image modifications]' \
       '*-interlace:interlacing scheme:(None Line Plane Partition)' \
-      '*-label:label string:' \
+      '*-label:label string' \
+      '*-magnify:factor' \
       '*-map:colormap type for display:(best default gray red green blue)' \
       '*-matte[store matte channel]' \
+      '*-mattecolor:color:_x_color' \
       '*-monochrome[transform to black and white]' \
+      '*-name:image name' \
       '*-negate[invert image]' \
       '*+negate[invert only grayscale]' \
-      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
-      '*-quality:JPEG/MIFF/PNG compression level:' \
-      '*-raise:3-D edges (raised):' \
-      '*+raise:3-D edges (lowered):' \
+      '*-noop' \
+      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '*-quality:JPEG/MIFF/PNG compression level' \
+      '*-raise:3-D edges (raised)' \
+      '*+raise:3-D edges (lowered)' \
       '*-remote:remote command (file name):_imagemagick' \
-      '*-roll:image roll offset ({+-}<x>{+-}<y>):' \
-      '*-rotate:rotation (degrees{<}{>}):' \
-      '*-sample:scale factors (<width>x<height>):' \
-      '*-scene:image scene number:' \
-      '*-segment:cluster pixel number:' \
-      '*-sharpen:sharpening factor (0.0 - 99.9%):' \
-      '*-size:image size (<width>x<height>+<offset>):' \
+      '*-roll:image roll offset ({+-}<x>{+-}<y>)' \
+      '*-rotate:rotation (degrees{<}{>})' \
+      '*-sample:scale factors (<width>x<height>)' \
+      '*-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \
+      '*-scenes:image scene number' \
+      '*-segment:cluster pixel number' \
+      '*-shared_memory' \
+      '*-sharpen:sharpening factor (0.0 - 99.9%%)' \
+      '*-size:image size (<width>x<height>+<offset>)' \
+      '*-text_font:_x_font' \
       '*-texture:background texture image:_imagemagick' \
-      '*-update:redisplay test time (seconds):' \
-      '*-title:image title:' \
-      '*-treedepth:color reduction tree depth:' \
+      '*-title:image title' \
+      '*-treedepth:color reduction tree depth' \
+      '*-trim' \
+      '*-update:redisplay test time (seconds)' \
+      '*-use_pixmap' \
+      '*-verbose' \
       '*-visual:visual to use for display:(StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default)' \
       '*-window:window ID to display image in:_x_window' \
+      '*-window_group' \
       '*-write:output filename:_files' \
       '*:picture file:_imagemagick' && return
   ;;
 
-animate)
-  _arguments -M 'm:{a-z}={A-Z}' \
+  animate)
+    _arguments -M 'm:{a-z}={A-Z}' \
       '*-backdrop[use full screen]' \
+      '*-background:color:_x_color' \
+      '*-bordercolor:color:_x_color' \
+      '*-borderwidth:geometry' \
+      '*-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '*-chop:<width>x<height>{+-}<x>{+-}<y>' \
       '*-colormap:colormap type:(Shared Private)' \
-      '*-colors:preferred number of colors:' \
+      '*-colors:preferred number of colors' \
       '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '*-delay:delay for next image (1/100ths of a second):' \
-      '*-density:resolution in pixels of image (<width>x<height>):' \
+      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>)' \
+      '*-debug' \
+      '*-delay:delay for next image (1/100ths of a second)' \
+      '*-density:image resolution (<width>x<height> in pixels)' \
+      '*-depth:image depth:(8 16)' \
       '*-display:display:_x_display' \
       '*-dither[apply dithering]' \
-      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '*-font:_x_font' \
+      '*-foreground:color:_x_color' \
+      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
+      '(- *)-help[display help information]' \
+      '*-iconGeometry:geometry:_x_geometry' \
+      '*-iconic' \
       '*-interlace:interlacing scheme:(None Line Plane Partition)' \
       '*-map:colormap type for display:(best default gray red green blue)' \
+      '*-matte[store matte channel]' \
+      '*-mattecolor:color:_x_color' \
       '*-monochrome[transform to black and white]' \
+      '*-name:image name' \
+      '*-noop' \
+      '*-pause:delay (seconds)' \
       '*-remote:remote command (file name):_imagemagick' \
-      '*-rotate:rotation (degrees{<}{>}):' \
-      '*-scene:image scene number:' \
-      '*-size:image size (<width>x<height>+<offset>):' \
-      '*-title:image title:' \
-      '*-treedepth:color reduction tree depth:' \
+      '*-rotate:rotation (degrees{<}{>})' \
+      '*-scenes:image scene number' \
+      '*-shared_memory' \
+      '*-size:image size (<width>x<height>+<offset>)' \
+      '*-text_font:_x_font' \
+      '*-title:image title' \
+      '*-treedepth:color reduction tree depth' \
+      '*-trim' \
       '*-verbose[print image information]' \
       '*-visual:visual to use for display:(StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default)' \
       '*-window:window ID to display image in:_x_window' \
       '*:picture file:_imagemagick' && return
   ;;
 
-import)
-  _arguments -M 'm:{a-z}={A-Z}' \
+  import)
+    _x_arguments -M 'm:{a-z}={A-Z}' \
       '-adjoin[join images]' \
       '-border:border size (<width>x<height>):' \
-      '-colors:preferred number of colors:' \
+      '-bordercolor:color:_x_color' \
+      '-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '-colors:preferred number of colors' \
       '-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '-comment:comment string:' \
-      '-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
-      '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '-delay:delay for next image (1/100ths of a second):' \
-      '-density:resolution in pixels of image (<width>x<height>):' \
+      '-comment:comment string' \
+      '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \
+      '-debug' \
+      '-delay:delay for next image (1/100ths of a second)' \
+      '-density:resolution in pixels of image (<width>x<height>)' \
+      '-depth:image depth:(8 16)' \
       '-descend[descend window hierarchy]' \
-      '-display:display:_x_display' \
       '-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
       '-dither[apply dithering]' \
+      '(+endian)-endian:image endianess:(MSB LSB)' \
+      '(-endian)+endian' \
       '-frame[include window manager frame]' \
-      '-geometry:image geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '(- *)-help[display help information]' \
       '-interlace:interlacing scheme:(None Line Plane Partition)' \
+      '-label:label string' \
       '-monochrome[transform to black and white]' \
       '-negate[invert image]' \
       '+negate[invert only grayscale]' \
-      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
-      '-pointsize:Postscript font size:' \
-      '-quality:JPEG/MIFF/PNG compression level:' \
-      '-rotate:rotation (degrees{<}{>}):' \
-      '-scene:number of screen snapshots:' \
+      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '-pause:delay (seconds)' \
+      '-ping' \
+      '-pointsize:Postscript font size' \
+      '-quality:JPEG/MIFF/PNG compression level' \
+      '-resize:size (<width>x<height>{%%}{@}{!}{<}{>})' \
+      '-rotate:rotation (degrees{<}{>})' \
+      '-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \
+      '-scene:number of screen snapshots' \
       '-screen[get root window]' \
       '-silent[be quiet]' \
-      '-transparency:transparent color:_x_color' \
-      '-treedepth:color reduction tree depth:' \
+      '-snaps:number' \
+      '-transparent:transparent color:_x_color' \
+      '-treedepth:color reduction tree depth' \
+      '-trim' \
+      '-type:image type:(Bilevel Grayscale Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte Optimize)' \
       '-verbose[print image information]' \
       '-window:window ID to get:_x_window' \
       ':output file:_files' && return
   ;;
 
-montage)
-  _arguments -M 'm:{a-z}={A-Z}' \
+  montage)
+    _arguments -M 'm:{a-z}={A-Z}' \
       '*-adjoin[join images]' \
-      '*-blur:blur factor (0.0 - 99.9%):' \
-      '*-colors:preferred number of colors:' \
+      '*-background:color:_x_color' \
+      '*-blur:blur factor (0.0 - 99.9%%)' \
+      '*-bordercolor:color:_x_color' \
+      '*-borderwidth:geometry' \
+      '*-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '*-colors:preferred number of colors' \
       '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '*-comment:comment string:' \
+      '*-comment:comment string' \
       '*-compose:image composition type:(Over In Out Atop Xor Plus Minus Add Subtract Difference Bumpmap Replace ReplaceRed ReplaceGreen ReplaceBlue ReplaceMatte)' \
       '*-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
-      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '*-density:resolution in pixels of image (<width>x<height>):' \
+      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \
+      '*-debug' \
+      '*-density:resolution in pixels of image (<width>x<height>)' \
+      '*-depth:image depth:(8 16)' \
       '*-display:display:_x_display' \
       '*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
       '*-dither[apply dithering]' \
       '*+dither[render Postscript without aliasing]' \
       '*-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
+      '*-endian:image endianess:(MSB LSB)' \
+      '*+endian' \
       '*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
       '*-frame[draw frame around image]' \
-      '*-frame[don'\''t draw frame around image]' \
       '*-font:annotation font:_x_font' \
-      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
       '*-gravity:image gravity:(Center North NorthEast East SouthEast South SouthWest West NorthWest)' \
+      '(- *)-help[display help information]' \
       '*-interlace:interlacing scheme:(None Line Plane Partition)' \
-      '*-label:label string:' \
+      '*-label:label string' \
       '*-matte[store matte channel]' \
+      '*-mattecolor:color:_x_color' \
       '*-mode:montage type:(Frame Unframe Concatenate)' \
       '*-monochrome[transform to black and white]' \
-      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '*-noop' \
+      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
       '*-pen:font color:_x_color' \
-      '*-pointsize:Postscript font size:' \
-      '*-quality:JPEG/MIFF/PNG compression level:' \
-      '*-rotate:rotation (degrees{<}{>}):' \
-      '*-scene:image scene number:' \
+      '*-pointsize:Postscript font size' \
+      '*-quality:JPEG/MIFF/PNG compression level' \
+      '*-resize:size (<width>x<height>{%%}{@}{!}{<}{>})' \
+      '*-rotate:rotation (degrees{<}{>})' \
+      '*-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \
+      '*-scenes:image scene number' \
       '*-shadow[add shadow]' \
-      '*-sharpen:sharpening factor (0.0 - 99.9%):' \
-      '*-size:image size (<width>x<height>+<offset>):' \
+      '*-sharpen:sharpening factor (0.0 - 99.9%%)' \
+      '*-size:image size (<width>x<height>+<offset>)' \
+      '*-stroke:color:_x_color' \
       '*-texture:background texture image:_imagemagick' \
-      '*-tile:number of tiles (<width>x<height>):' \
-      '*-transparency:transparent color:_x_color' \
-      '*-treedepth:color reduction tree depth:' \
+      '*-tile:number of tiles (<width>x<height>)' \
+      '*-title:image title' \
+      '*-transparent:transparent color:_x_color' \
+      '*-treedepth:color reduction tree depth' \
+      '*-trim' \
+      '*-type:image type:(Bilevel Grayscale Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte Optimize)' \
       '*-verbose[print image information]' \
       '*:picture file:_imagemagick' && return
   ;;
 
-convert)
-  _arguments -C -M 'm:{a-z}={A-Z}' \
+  convert)
+    _arguments -C -M 'm:{a-z}={A-Z}' \
       '-adjoin[join images]' \
+      '-affine[drawing transform matrix]:matrix' \
       '-antialias[remove pixel aliasing]' \
       '-append[append image sequence]' \
       '-average[average image sequence]' \
-      '-blur:blur factor (0.0 - 99.9%):' \
-      '-border:border size (<width>x<height>):' \
+      '-background[specify background color]:color:_x_color' \
+      '-blur:blur factor (0.0 - 99.9%%)' \
+      '-border:border size (<width>x<height>)' \
       '-bordercolor:border color:_x_color' \
       '-box:annotation bounding box color:_x_color' \
-      '-charcoal:charcoal drawing factor:' \
-      '-coalesce[merge image sequence]:' \
-      '-colorize:colorization amount (<num> or <red>/<green>/<blue>):' \
-      '-colors:preferred number of colors:' \
+      '-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '-channel:channel:(Red Green Blue Opacity Cyan Magenta Yellow Black)' \
+      '-charcoal:charcoal drawing factor' \
+      '-chop:<width>x<height>{+-}<x>{+-}<y>' \
+      '-clip' \
+      '-coalesce[merge image sequence]' \
+      '-colorize:colorization amount (<num> or <red>/<green>/<blue>)' \
+      '-colors:preferred number of colors' \
       '-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '-comment:comment string:' \
+      '-comment:comment string' \
       '-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
       '-contrast[enhance contrast]' \
       '+contrast[reduce contrast]' \
-      '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '-cycle:image colormap shift:' \
+      '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \
+      '-cycle:image colormap shift' \
+      '-debug' \
       '-deconstruct[break down image sequence into parts]' \
-      '-delay:delay for next image (1/100ths of a second):' \
-      '-density:resolution in pixels of image (<width>x<height>):' \
+      '-delay:delay for next image (1/100ths of a second)' \
+      '-density:resolution in pixels of image (<width>x<height>)' \
       '-depth:image depth:(8 16)' \
       '-despeckle[reduce speckles in image]' \
       '-display:display:_x_display' \
       '-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
       '-dither[apply dithering]' \
       '-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
-      '-edge:edge detection factor (0.0 - 99.9%):' \
+      '-edge:edge detection factor (0.0 - 99.9%%)' \
       '-emboss[emboss image]' \
+      '(+endian)-endian:image endianess:(MSB LSB)' \
+      '(-endian)+endian' \
       '-enhance[enhance image]' \
       '-equalize[histogram equalization]' \
+      '-fill[specify color to use when filling a graphic primitive]:color:_x_color' \
       '-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
+      '-flatten[flatten a sequence of images]' \
       '-flip[vertical mirror image]' \
       '-flop[horizontal mirror image]' \
       '-font:annotation font:_x_font' \
       '-frame:border dimensions (<width>x<height>+<out>+<in>)' \
-      '-fuzz:maximum distance for equal colors:' \
-      '-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '-fuzz:maximum distance for equal colors' \
+      '-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
       '-gravity:image gravity:(Center North NorthEast East SouthEast South SouthWest West NorthWest)' \
-      '-implode:implosion factor (0.0 - 99.9%):' \
+      '-implode:implosion factor (0.0 - 99.9%%)' \
       '-interlace:interlacing scheme:(None Line Plane Partition)' \
-      '-label:label string:' \
+      '-label:label string' \
       '-layer:layer type:(Red Green Blue Matte)' \
-      '-linewidth:line width:' \
-      '-loop:number of iterations (GIF animation):' \
+      '-linewidth:line width' \
+      '-loop:number of iterations (GIF animation)' \
       '-map[single image colormap file]:picture file for colors:_imagemagick' \
       '+map[all images colormap file]:picture file for colors:_imagemagick' \
       '-matte[store matte channel]' \
-      '-modulate:<brightness>,<saturation>,<hue>:' \
+      '-modulate:<brightness>,<saturation>,<hue>' \
       '-monochrome[transform to black and white]' \
       '-morph[morph image sequence]' \
       '-negate[invert image]' \
@@ -248,37 +330,37 @@ convert)
       '+noise:noise type:(Uniform Gaussian Multiplicative Impulse Laplacian Poisson)' \
       '-normalize[use full color value range]' \
       '-opaque:image pen color:_x_color' \
-      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
-      '-paint:oil painting radius:' \
+      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '-paint:oil painting radius' \
       '-pen:font color:_x_color' \
-      '-pointsize:Postscript font size:' \
+      '-pointsize:Postscript font size' \
       '-preview:image preview type:(Rotate Shear Roll Hue Saturation Brightness Gamma Spiff Dull Grayscale Quantize Despeckle ReduceNoise AddNoise Sharpen Blur Threshold Edge Detect Spread Shade Raise Segment Solarize Swirl Implode Wave OilPaint CharcoalDrawing JPEG)' \
       '-profile:information profile:->profile' \
-      '-quality:JPEG/MIFF/PNG compression level:' \
-      '-raise:lighten or darken edges (<width>x<height>):' \
-      '-region:image region (<width>x<height>{+-}<x>{+-}<y>):' \
-      '-roll:image roll offset ({+-}<x>{+-}<y>):' \
-      '-rotate:rotation (degrees{<}{>}):' \
-      '-sample:scale factors (<width>x<height>):' \
-      '-scene:image scene number:' \
-      '-seed:random number seed:' \
-      '-segment:segment thresholds (<cluster>x<smoothing>):' \
-      '-shade:image shading (<azimuth>x<elevation>):' \
-      '-sharpen:sharpening factor (0.0 - 99.9%):' \
-      '-shear:shearing angles (<x>x<y> in degrees):' \
-      '-size:image size (<width>x<height>+<offset>):' \
-      '-solarize:solarization threshold:' \
-      '-spread:neighborhood size:' \
-      '-swirl:swirl tightness:' \
+      '-quality:JPEG/MIFF/PNG compression level' \
+      '-raise:lighten or darken edges (<width>x<height>)' \
+      '-region:image region (<width>x<height>{+-}<x>{+-}<y>)' \
+      '-roll:image roll offset ({+-}<x>{+-}<y>)' \
+      '-rotate:rotation (degrees{<}{>})' \
+      '-sample:scale factors (<width>x<height>)' \
+      '-scene:image scene number' \
+      '-seed:random number seed' \
+      '-segment:segment thresholds (<cluster>x<smoothing>)' \
+      '-shade:image shading (<azimuth>x<elevation>)' \
+      '-sharpen:sharpening factor (0.0 - 99.9%%)' \
+      '-shear:shearing angles (<x>x<y> in degrees)' \
+      '-size:image size (<width>x<height>+<offset>)' \
+      '-solarize:solarization threshold' \
+      '-spread:neighborhood size' \
+      '-swirl:swirl tightness' \
       '-texture:background texture image:_imagemagick' \
-      '-threshold:threshold for maximum intensity:' \
+      '-threshold:threshold for maximum intensity' \
       '-transparency:transparent color:_x_color' \
-      '-treedepth:color reduction tree depth:' \
+      '-treedepth:color reduction tree depth' \
       '-units:image resolution type:(Undefined PixelsPerInch PixelsPerCentimeter)' \
       '-verbose[print image information]' \
-      '-view:FlashPix viewing parameters:' \
-      '-wave:sine wave parameters (<amplitude>x<wavelength>):' \
-      '*:picture file:_imagemagick' && return 0
+      '-view:FlashPix viewing parameters' \
+      '-wave:sine wave parameters (<amplitude>x<wavelength>)' \
+      '*:picture file:_imagemagick' && return
 
     if [[ "$state" = profile ]]; then
       if compset -P '*:'; then
@@ -290,36 +372,36 @@ convert)
     fi
   ;;
 
-combine)
-  _arguments -M 'm:{a-z}={A-Z}' \
-      '-blend:blending factor (0.0 - 99.9%):' \
-      '-colors:preferred number of colors:' \
+  combine|composite)
+    _arguments -M 'm:{a-z}={A-Z}' \
+      '-blend:blending factor (0.0 - 99.9%%)' \
+      '-colors:preferred number of colors' \
       '-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '-comment:comment string:' \
+      '-comment:comment string' \
       '-compose:image composition type:(Over In Out Atop Xor Plus Minus Add Subtract Difference Bumpmap Replace ReplaceRed ReplaceGreen ReplaceBlue ReplaceMatte)' \
       '-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
-      '-density:resolution in pixels of image (<width>x<height>):' \
-      '-displace:displacements scales (<horizontal>x<vertical>):' \
+      '-density:resolution in pixels of image (<width>x<height>)' \
+      '-displace:displacements scales (<horizontal>x<vertical>)' \
       '-display:display:_x_display' \
       '-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
       '-dither[apply dithering]' \
       '+dither[render Postscript without aliasing]' \
       '-font:normal text font:_x_font' \
-      '-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
       '-gravity:image gravity:(Center North NorthEast East SouthEast South SouthWest West NorthWest)' \
       '-interlace:interlacing scheme:(None Line Plane Partition)' \
-      '-label:label string:' \
+      '-label:label string' \
       '-matte[store matte channel]' \
       '-monochrome[transform to black and white]' \
       '-negate[invert image]' \
       '+negate[invert only grayscale]' \
-      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
-      '-quality:JPEG/MIFF/PNG compression level:' \
-      '-scene:image scene number:' \
-      '-stegano:watermark offset:' \
+      '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '-quality:JPEG/MIFF/PNG compression level' \
+      '-scene:image scene number' \
+      '-stegano:watermark offset' \
       '-stereo[create stereo anaglyph]' \
       '-tile[repeat composite operation]' \
-      '-treedepth:color reduction tree depth:' \
+      '-treedepth:color reduction tree depth' \
       '-verbose[print image information]' \
       ':image file:_imagemagick' \
       ':composite file:_imagemagick' \
@@ -327,25 +409,27 @@ combine)
       ':combined file:_files' && return
   ;;
 
-mogrify)
-  _arguments -M 'm:{a-z}={A-Z}' \
+  mogrify)
+    _arguments -M 'm:{a-z}={A-Z}' \
+      '*-affine[drawing transform matrix]:matrix' \
       '*-antialias[remove pixel aliasing]' \
-      '*-blur:blur factor (0.0 - 99.9%):' \
-      '*-border:border size (<width>x<height>):' \
+      '*-background[specify background color]:color:_x_color' \
+      '*-blur:blur factor (0.0 - 99.9%%)' \
+      '*-border:border size (<width>x<height>)' \
       '*-bordercolor:border color:_x_color' \
       '*-box:annotation bounding box color:_x_color' \
-      '*-charcoal:charcoal drawing factor:' \
-      '*-colorize:colorization amount (<num> or <red>/<green>/<blue>):' \
-      '*-colors:preferred number of colors:' \
+      '*-charcoal:charcoal drawing factor' \
+      '*-colorize:colorization amount (<num> or <red>/<green>/<blue>)' \
+      '*-colors:preferred number of colors' \
       '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \
-      '*-comment:comment string:' \
+      '*-comment:comment string' \
       '*-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \
       '*-contrast[enhance contrast]' \
       '*+contrast[reduce contrast]' \
-      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%}):' \
-      '*-cycle:image colormap shift:' \
-      '*-delay:delay for next image (1/100ths of a second):' \
-      '*-density:resolution in pixels of image (<width>x<height>):' \
+      '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \
+      '*-cycle:image colormap shift' \
+      '*-delay:delay for next image (1/100ths of a second)' \
+      '*-density:resolution in pixels of image (<width>x<height>)' \
       '*-depth:image depth:(8 16)' \
       '*-despeckle[reduce speckles in image]' \
       '*-display:display:_x_display' \
@@ -353,7 +437,7 @@ mogrify)
       '*-dither[apply dithering]' \
       '*+dither[render Postscript without aliasing]' \
       '*-draw:drawing primitive:compadd -S "\\ " - point line rectangle fillRectangle circle fillCircle ellipse fillEllipse polygon fillPolygon color matte text image' \
-      '*-edge:edge detection factor (0.0 - 99.9%):' \
+      '*-edge:edge detection factor (0.0 - 99.9%%)' \
       '*-emboss[emboss image]' \
       '*-enhance[enhance image]' \
       '*-equalize[histogram equalization]' \
@@ -363,20 +447,20 @@ mogrify)
       "*-format:output file format:(${formats//:/ })" \
       '*-font:annotation font:_x_font' \
       '*-frame:border dimensions (<width>x<height>+<out>+<in>)' \
-      '*-fuzz:maximum distance for equal colors:' \
-      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>):' \
-      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):' \
+      '*-fuzz:maximum distance for equal colors' \
+      '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \
+      '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \
       '*-gravity:image gravity:(Center North NorthEast East SouthEast South SouthWest West NorthWest)' \
-      '*-implode:implosion factor (0.0 - 99.9%):' \
+      '*-implode:implosion factor (0.0 - 99.9%%)' \
       '*-interlace:interlacing scheme:(None Line Plane Partition)' \
       '*-layer:layer type:(Red Green Blue Matte)' \
-      '*-linewidth:line width:' \
-      '*-loop:number of iterations (GIF animation):' \
+      '*-linewidth:line width' \
+      '*-loop:number of iterations (GIF animation)' \
       '*-map[single image colormap file]:picture file for colors:_imagemagick' \
       '*+map[all images colormap file]:picture file for colors:_imagemagick' \
       '*-matte[store matte channel]' \
-      '*-modulate:<brightness>,<saturation>,<hue>:' \
+      '*-modulate:<brightness>,<saturation>,<hue>' \
       '*-monochrome[transform to black and white]' \
       '*-negate[invert image]' \
       '*+negate[invert only grayscale]' \
@@ -384,45 +468,45 @@ mogrify)
       '*+noise:noise type:(Uniform Gaussian Multiplicative Impulse Laplacian Poisson)' \
       '*-normalize[use full color value range]' \
       '*-opaque:image pen color:_x_color' \
-      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
-      '*-paint:oil painting radius:' \
+      '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \
+      '*-paint:oil painting radius' \
       '*-pen:font color:_x_color' \
-      '*-pointsize:Postscript font size:' \
-      '*-quality:JPEG/MIFF/PNG compression level:' \
-      '*-raise:lighten or darken edges (<width>x<height>):' \
-      '*-region:image region (<width>x<height>{+-}<x>{+-}<y>):' \
-      '*-resize:size (<width>x<height>{%}{@}{!}{<}{>}):' \
-      '*-roll:image roll offset ({+-}<x>{+-}<y>):' \
-      '*-rotate:rotation (degrees{<}{>}):' \
-      '*-sample:scale factors (<width>x<height>):' \
-      '*-scene:image scene number:' \
-      '*-seed:random number seed:' \
-      '*-segment:segment thresholds (<cluster>x<smoothing>):' \
-      '*-shade:image shading (<azimuth>x<elevation>):' \
-      '*-sharpen:sharpening factor (0.0 - 99.9%):' \
-      '*-shave:shave edges (<width>x<height>{%}):' \
-      '*-shear:shearing angles (<x>x<y> in degrees):' \
-      '*-size:image size (<width>x<height>+<offset>):' \
-      '*-solarize:solarization threshold:' \
-      '*-spread:neighborhood size:' \
-      '*-swirl:swirl tightness:' \
+      '*-pointsize:Postscript font size' \
+      '*-quality:JPEG/MIFF/PNG compression level' \
+      '*-raise:lighten or darken edges (<width>x<height>)' \
+      '*-region:image region (<width>x<height>{+-}<x>{+-}<y>)' \
+      '*-resize:size (<width>x<height>{%%}{@}{!}{<}{>})' \
+      '*-roll:image roll offset ({+-}<x>{+-}<y>)' \
+      '*-rotate:rotation (degrees{<}{>})' \
+      '*-sample:scale factors (<width>x<height>)' \
+      '*-scene:image scene number' \
+      '*-seed:random number seed' \
+      '*-segment:segment thresholds (<cluster>x<smoothing>)' \
+      '*-shade:image shading (<azimuth>x<elevation>)' \
+      '*-sharpen:sharpening factor (0.0 - 99.9%%)' \
+      '*-shave:shave edges (<width>x<height>{%%})' \
+      '*-shear:shearing angles (<x>x<y> in degrees)' \
+      '*-size:image size (<width>x<height>+<offset>)' \
+      '*-solarize:solarization threshold' \
+      '*-spread:neighborhood size' \
+      '*-swirl:swirl tightness' \
       '*-texture:background texture image:_imagemagick' \
-      '*-threshold:threshold for maximum intensity:' \
+      '*-threshold:threshold for maximum intensity' \
       '*-transparency:transparent color:_x_color' \
-      '*-treedepth:color reduction tree depth:' \
+      '*-treedepth:color reduction tree depth' \
       '*-units:image resolution type:(Undefined PixelsPerInch PixelsPerCentimeter)' \
       '*-verbose[print image information]' \
-      '*-view:FlashPix viewing parameters:' \
-      '*-wave:sine wave parameters (<amplitude>x<wavelength>):' \
+      '*-view:FlashPix viewing parameters' \
+      '*-wave:sine wave parameters (<amplitude>x<wavelength>)' \
       '*:picture file:_imagemagick' && return
   ;;
 
-xtp)
-  _arguments -M 'm:{a-z}={A-Z}' \
-      '-account:password:' \
+  xtp)
+    _arguments -M 'm:{a-z}={A-Z}' \
+      '-account:password' \
       '-binary[retrieve files as binary]' \
       '-directory[list directory]' \
-      '-exclude:regular expression for exclusion:' \
+      '-exclude:regular expression for exclusion' \
       '-file:output file:_files' \
       '-get[get files]' \
       '-port:port: _ports' \
@@ -431,23 +515,25 @@ xtp)
       '-prune[process files from remote directory]' \
       '-put[put files]' \
       '-retrieve[retrieve matching files]' \
-      '-timeout:maximum timeout:' \
+      '-timeout:maximum timeout' \
       '-type:remote system type:(UNIX VMS other)' \
       ':url: _urls' && return
   ;;
 
-identify)
-  _arguments \
-      '*-density:resolution in pixels of image (<width>x<height>):' \
+  identify)
+    _arguments \
+      '*-cache[specify memory available to the pixel cache]:memory (MB)' \
+      '*-debug' '*-ping' \
+      '*-density:resolution in pixels of image (<width>x<height>)' \
       '*-depth[specify image depth]:image depth:(8 16)' \
-      '*-size:image size (<width>x<height>+<offset>):' \
+      '*-format[specify format for image characteristics]:format' \
+      '(- *)-help[display help information]' \
+      '*-size:image size (<width>x<height>+<offset>)' \
       '*-verbose[print more detailed info about image]' \
-      '*-noop[disable effect of preceding options]' \
       '*:picture file:_imagemagick' && return
- ;;
+   ;;
 
-*)
-  _message 'eh?'
+  *) _message 'eh?' ;;
 esac
 
 return 1
diff --git a/Completion/Unix/Command/_irssi b/Completion/Unix/Command/_irssi
index d84812010..81735cd2b 100644
--- a/Completion/Unix/Command/_irssi
+++ b/Completion/Unix/Command/_irssi
@@ -1,45 +1,36 @@
 #compdef irssi
 
-typeset -A opt_args
-
 local expl
 
 _irssi_servers() {
-		local a
-		a=($(grep "\(^[{ 	]*address\)\|\([{ 	]address\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*address *= *\"\([^\"]\+\).*,\1 ,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*address\)\|\([{ 	]address\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*address *= *\"\([^\"]\+\).*,\1 ,g") )
+  _wanted irc-servers expl 'irc server' compadd "$@" -a - a
+}
 
 _irssi_ports() {
-		local a
-		a=($(grep "\(^[{ 	]*port\)\|\([{ 	]port\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*port *= *\"\([^\"]\+\).*,\1,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*port\)\|\([{ 	]port\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*port *= *\"\([^\"]\+\).*,\1,g") )
+  _wanted ports expl 'port' compadd "$@" -a - a
+}
 
 _irssi_nick() {
-		local a
-		a=($(grep "\(^[{ 	]*nick\)\|\([{ 	]nick\)\|\([{ 	]alternate_nick\)\|\(^[{ 	]*alternate_nick\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*nick *= *\"\([^\"]\+\).*,\1,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*nick\)\|\([{ 	]nick\)\|\([{ 	]alternate_nick\)\|\(^[{ 	]*alternate_nick\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*nick *= *\"\([^\"]\+\).*,\1,g") )
+  _wanted nicknames expl 'nick' compadd "$@" -a - a
+}
 
-_arguments -C -s \
-	"--config=[config file]:config:_files" \
-	"--home=[home dir location]:home:_dir_list" \
-	"-c[connect to servers]:irc servers: _irssi_servers" \
-	"--connect=[connect to servers]:irc servers: _irssi_servers" \
-	'-w[password]' \
-	'--password=[password]' \
-	"-p[specify a port]:port: _irssi_ports" \
-	"--port=[specify a port]:port: _irssi_ports" \
-	'-![disable autoconnect]' \
-	'--noconnect[disable autoconnect]' \
-	"-n[set nick name]:nick: _irssi_nick" \
-	"--nick=[set nick name]:nick: _irssi_nick" \
-	'-h[hostname]' \
-	'--hostname=[hostname]' \
-	'-v[version]' \
-	'--version[version]' \
-	'-?[help message]' \
-	'--help[help message]' \
-	'--usage[display usage]' \
+_arguments -s \
+  '--config=[config file]:config:_files' \
+  '--home=[home dir location]:home:_dir_list' \
+  '(-c --connect)'{-c,--connect=}'[connect to servers]:irc server:_irssi_servers' \
+  '(-w --password)'{-w,--password=}'[password]:password' \
+  '(-p --port)'{-p,--port=}'[specify a port]:port:_irssi_ports' \
+  '-![disable autoconnect]' \
+  '--noconnect[disable autoconnect]' \
+  '(-n --nick)'{-n,--nick=}'[set nick name]:nick:_irssi_nick" \
+  '(-h --hostname)'{-h,--hostname=}'[specify hostname]:hostname:_hosts' \
+  '(-)'{-v,--version}'[display version information]' \
+  '(-)'{-\?,--help}'[display help information]' \
+  '(-)--usage[display usage]' \
 
diff --git a/Completion/Unix/Command/_mysql_utils b/Completion/Unix/Command/_mysql_utils
index 1fb4dc689..547a17b2e 100644
--- a/Completion/Unix/Command/_mysql_utils
+++ b/Completion/Unix/Command/_mysql_utils
@@ -1,23 +1,19 @@
 #compdef mysql mysqlshow mysqldump mysqladmin
-#
-# zsh completion functions for mysql client programs
+
 # Adam Spiers <adam@spiers.net>
-#
 
-##
-## Auxiliary functions
-##
+# Auxiliary functions
 
 _mysql_get_identity () {
-  _mysql_user=${opt_args[-u]-$opt_args[--user]}
-  _mysql_port=${opt_args[-P]-$opt_args[--port]}
-  _mysql_host=${opt_args[-h]-$opt_args[--host]}
+  _mysql_user=${(v)opt_args[(i)-u|--user]}
+  _mysql_port=${(v)opt_args[(i)-P|--port]}
+  _mysql_host=${(v)opt_args[(i)-h|--host]}
 
   _mysql_params=(
-                 ${_mysql_user:+"--user=$_mysql_user"}
-                 ${_mysql_host:+"--host=$_mysql_host"}
-                 ${_mysql_port:+"--port=$_mysql_port"}
-                )
+    ${_mysql_user:+"--user=$_mysql_user"}
+    ${_mysql_host:+"--host=$_mysql_host"}
+    ${_mysql_port:+"--port=$_mysql_port"}
+  )
 }
 
 _mysql_hosts () {
@@ -57,29 +53,16 @@ _mysql_databases () {
   local _mysql_user _mysql_port _mysql_host _mysql_params
   _mysql_get_identity
 
-  local _mysql_databases
-  _mysql_databases=(
-                    ${(f)~~"$( echo "show databases" |
-                               mysql "$_mysql_params[@]" )"}
-                   )
-  shift _mysql_databases
-
-  compadd "$expl[@]" -a _mysql_databases
+  compadd "$@" - ${${(f)~~"$(_call_program databases \
+      mysql "$_mysql_params[@]" <<<'show databases' 2>/dev/null)"}[2,-1]}
 }
 
 _mysql_tables () {
   local _mysql_user _mysql_port _mysql_host _mysql_params
   _mysql_get_identity
 
-  local _mysql_tables
-  _mysql_tables=(
-                 ${(f)~~"$( echo "show tables" |
-                              mysql "$_mysql_params[@]" $1 )"}
-                )
-  # remove header
-  shift _mysql_tables
-
-  compadd "$expl[@]" -a _mysql_tables
+  compadd "$@" - ${${(f)~~"$(_call_program tables \
+      mysql "$_mysql_params[@]" $1 <<< 'show tables' 2>/dev/null)"}[2,-1]}
 }
 
 _mysql_variables () {
@@ -89,27 +72,12 @@ _mysql_variables () {
 }
 
 
-##
-## The actual completion code for the commands
-##
-
-_mysql_common_opts=(
-    {-\?,--help}'[display help]'
-    {-S+,--socket=}':server socket file:_files'
-    {-h+,--host=}':server hostname:_mysql_hosts'
-    {-P+,--port=}':server port:_mysql_ports'
-    {-u+,--user=}':server username:_mysql_users'
-    {-p+,--password=}':server password: '
-    {-C,--compress}'[use compression in server/client protocol]'
-)
+# The actual completion code for the commands
 
 _mysql () {
-  local curcontext="$curcontext" state line expl
-  typeset -A opt_args
-
-  _arguments -C -s \
+  _arguments -s \
     "$_mysql_common_opts[@]" \
-    {-V,--version}'[display client version]' \
+    '(- :)'{-V,--version}'[display client version]' \
     {-A,--no-auto-rehash}'[no automatic rehashing]' \
     '(-t --table)'{-B,--batch}'[batch mode (no pretty ASCII)]' \
     {-T,--debug-info}'[print debug info on exit]' \
@@ -129,14 +97,11 @@ _mysql () {
     {-v,--verbose}'[verbose mode]' \
     {-E,--vertical}'[print query output vertically]' \
     {-w,--wait}'[wait and retry server connection if necessary]' \
-    ':MySQL database to use:_mysql_databases'
+    ':MySQL database:_mysql_databases'
 }
 
 _mysqlshow () {
-  local curcontext="$curcontext" state line expl
-  typeset -A opt_args
-
-  _arguments -C -s \
+  _arguments -s \
     "$_mysql_common_opts[@]" \
     {-V,--version}'[display version]' \
     {-\#+,--debug=}':debug file: ' \
@@ -146,10 +111,7 @@ _mysqlshow () {
 }
 
 _mysqldump () {
-  local curcontext="$curcontext" state line expl
-  typeset -A opt_args
-
-  _arguments -C -s \
+  _arguments -s \
     "$_mysql_common_opts[@]" \
     {-V,--version}'[display version]' \
     {-a,--all}'[include all create options]' \
@@ -179,51 +141,59 @@ _mysqldump () {
 }
 
 _mysqladmin () {
-  local curcontext="$curcontext" state line expl
+  local curcontext="$curcontext" state line expl ret=1
   typeset -A opt_args
 
   _arguments -C -s \
     "$_mysql_common_opts[@]" \
-    {-v,--version}'[display version]' \
-    {-\#+,--debug=}':debug file: ' \
-    {-f,--force}'[continue through errors]' \
-    {-i+,--sleep=}'[repeat commands periodically]:number of seconds between executions: ' \
-    {-s,--silent}"[silently exit if can't connect to server]" \
-    {-t+,--timeout=}'[timeout for connection]' \
-    {-w+,--wait=}'[wait and retry server connection if necessary]:number of retries: ' \
-    '*::admin command:_mysqladmin_commands'
-}
-
-_mysqladmin_commands () {
-  local cmds expl
-  cmds=(
-        create drop extended-status
-        flush-{hosts,logs,status,tables,privileges}
-        kill password ping processlist
-        reload refresh shutdown
-        status variables version
-       )
-
-  if (( CURRENT == 1 )); then
-    _wanted commands expl command compadd "$@" -a cmds
-  else
-    local curcontext="$curcontext"
-
-    case "${words[1]:t}" in
-      (create|drop)
-        _wanted mysqldbs expl "MySQL databases" _mysql_databases
-      ;;
-      (kill)
-        _message -e ids 'thread ids'
-      ;;
-      (password)
-        _message -e passwords 'new password'
-      ;;
-    esac
+    '(- *)'{-v,--version}'[display version]' \
+    '(-\# --debug)'{-\#+,--debug=}'[output debug log]:debug file' \
+    '(-f --force)'{-f,--force}'[continue through errors]' \
+    '(-i --sleep)'{-i+,--sleep=}'[repeat commands periodically]:number of seconds between executions: ' \
+    '(-s --silent)'{-s,--silent}"[silently exit if can't connect to server]" \
+    '(-t --timeout)'{-t+,--timeout=}'[specify timeout for connection]:time (seconds)' \
+    '(-w --wait)'{-w+,--wait=}'[wait and retry server connection if necessary]:number of retries' \
+    '*::mysqladmin command:->mysqladmin-commands' && ret=0
+
+  if [[ -n "$state" ]]; then
+    if (( CURRENT == 1 )); then
+      _wanted commands expl 'mysqladmin command' compadd - \
+	  create drop extended-status \
+	  flush-{hosts,logs,status,tables,privileges} \
+	  kill password ping processlist \
+	  reload refresh shutdown \
+	  status variables version && ret=0
+    else
+      case "${words[1]:t}" in
+	create|drop)
+	  _wanted databases expl "MySQL databases" _mysql_databases && ret=0
+	;;
+	kill)
+	  _message -e ids 'thread ids'
+	;;
+	password)
+	  _message -e passwords 'new password'
+	;;
+      esac
+    fi
   fi
+
+  return ret
 }
 
 _mysql_utils () {
+  local _mysql_common_opts
+
+  _mysql_common_opts=(
+    '(-)'{-\?,--help}'[display help]'
+    '(-S --socket)'{-S+,--socket=}'[specify socket file to use for connection]:server socket file:_files'
+    '(-h --host)'{-h+,--host=}'[specify server hostname]:hostname:_mysql_hosts'
+    '(-P,--port)'{-P+,--port=}'[specify port number for connection]:server port:_mysql_ports'
+    '(-u --user)'{-u+,--user=}'[specify username for login]:server username:_mysql_users'
+    '(-p --password)'{-p+,--password=}'[specify password to use for connection]:server password'
+    '(-C --compress)'{-C,--compress}'[use compression in server/client protocol]'
+  )
+
   case "$service" in
     mysql)
       _mysql "$@"
diff --git a/Completion/Unix/Command/_pbm b/Completion/Unix/Command/_pbm
index c33e09140..17963c1e7 100644
--- a/Completion/Unix/Command/_pbm
+++ b/Completion/Unix/Command/_pbm
@@ -15,8 +15,8 @@ elif [[ "$service" = *top[bgpn]m ]]; then
 else
   pat="*.(#i)${service[1,3]}"
 fi
-  
-if [[ $# -ne 0 || $+_in_pbm -ne 0 ]]; then
+
+if (( $# + $+_in_pbm )); then
   _wanted files expl 'picture file' _path_files "$@" -g "$pat" - ||
       _files "$@" "$expl[@]" -g '*.(#i)p[bgp]m'
   return
@@ -27,25 +27,25 @@ local _in_pbm=yes
 case "$service" in
 asciitop[gn]m)
   _arguments \
-    '-d[specify divisor]:divisor:' \
-    ':height:' ':width:' ':file: _pbm'
+    '-d[specify divisor]:divisor' \
+    ':height' ':width' ':file:_pbm'
   ;;
 
 fitstopgm)
   _arguments \
-    '-image[specify image number]:image number:' \
-    ':file: _pbm'
+    '-image[specify image number]:image number' \
+    ':file:_pbm'
   ;;
 
 fitstopnm)
   _arguments \
-    '-image[specify image number]:image number:' \
+    '-image[specify image number]:image number' \
     '-noraw[produce ASCII pnm file]' \
     '(-min -max)-scanmax[force scanning data for minimum and maximum]' \
     '-printmax[only print minimum and maximum values]' \
-    '(-scanmax)-min[override minimum value]:minimum value:' \
-    '(-scanmax)-max[override maximum value]:maximum value:' \
-    ':file: _pbm'
+    '(-scanmax)-min[override minimum value]:minimum value' \
+    '(-scanmax)-max[override maximum value]:maximum value' \
+    ':file:_pbm'
   ;;
 
 g3topbm)
@@ -53,18 +53,30 @@ g3topbm)
     '-kludge[ignore first few lines]' \
     '-reversebits[interpret bits least-significant first]' \
     '-stretch[duplicate each row]' \
-    ':file: _pbm'
+    ':file:_pbm'
   ;;
 
 giftopnm)
   _arguments \
+    '-alphaout=[output alpha channel]:file:_pbm' \
     '-verbose[verbose mode]' \
     '-comments[only print comment fields]' \
-    '-image[specify image number]:image number:' \
-    ':file: _pbm'
+    '-image[specify image number]:image number' \
+    ':file:_pbm'
+  ;;
+
+jpegtopnm)
+  _arguments \
+    '-dct:dct method:(int fast float)' \
+    -{nosmooth,adobe,notadobe,dumpexif,comments,verbose} \
+    '-maxmemory:memory use limit (kB)' \
+    '-exif=:file:_files' \
+    '-tracelevel:trace level' \
+    ':file:_pbm'
   ;;
+
 macptopbm)
-  _arguments '-extraskip:number of bytes to skip:' ':file: _pbm'
+  _arguments '-extraskip:number of bytes to skip' ':file:_pbm'
   ;;
 
 pbmclean)
@@ -80,15 +92,15 @@ pbmmake)
     '(-black -gray)-white[produce white pbm file]' \
     '(-white -gray)-black[produce black pbm file]' \
     '(-white -black)-gray[produce gray pbm file (stippled)]' \
-    ':width:' ':height:'
+    ':width' ':height'
   ;;
 
 pbmmask)
-  _arguments '-expand[expand mask by one pixel]' ':file: _pbm'
+  _arguments '-expand[expand mask by one pixel]' ':file:_pbm'
   ;;
 
 pbmpscale)
-  _arguments ':scale factor:' ':file: _pbm'
+  _arguments ':scale factor' ':file:_pbm'
   ;;
 
 pbmreduce)
@@ -96,119 +108,120 @@ pbmreduce)
     '(-fs -threshold)-floyd[use Floyd-Steinberg error diffusion]' \
     '(-floyd -threshold)-fs[use Floyd-Steinberg error diffusion]' \
     '(-floy -fs)-threshold[use simple thresholding]' \
-    '-value[specify thresholding value]:threshold value:' \
-    ':reduction factor:' ':file: _pbm'
+    '-value[specify thresholding value]:threshold value' \
+    ':reduction factor' ':file:_pbm'
   ;;
 
 pbmtext)
   _arguments \
     '(-builtin)-font[specify font file]:font file:_files -g \*.\(\#i\)pbm' \
     '(-font)-builtin[select builtin font]:builtin font:(bdf fixed)' \
-    '*:text:'
+    '-space[add space between characters]:space (pixels)' \
+    '*:text'
   ;;
 
 pbmto10x)
-  _arguments '-h[use resolution 120 x 144]' ':file: _pbm'
+  _arguments '-h[use resolution 120 x 144]' ':file:_pbm'
   ;;
 
 pbmtobg|pbmtobbnbg)
-  _arguments ':raster operation:' ':x position:' ':y position:'
+  _arguments ':raster operation' ':x position' ':y position'
   ;;
 
 pbmtoepsi)
-  _arguments '-bbonly[only create boundary box]' ':file: _pbm'
+  _arguments '-bbonly[only create boundary box]' ':file:_pbm'
   ;;
 
 pbmtolj)
   _arguments \
+    '-resolution[specify output device resolution]:resolution:(75 100 150 300 600)' \
     '-float[suppress positioning information]' \
-    '-norest[don'"'"'t write reset sequences]' \
-    '-resolution[specify output device resolution]:resolution:(75 100 150 300)' \
-    ':file: _pbm'
+    "-norest[don't write reset sequences]" \
+    '(-delta -compress)-packbits[enable use of TIFF packbits compression]' \
+    '(-packbits -compress)-delta[enable use of delta-between-rows compression]' \
+    '(-packbits -delta)-compress[enable both compression schemes]' \
+    ':file:_pbm'
   ;;
 
 pbmtoln03)
   _arguments \
-    '-l[specify left margin]:left margin:' \
-    '-r[specify right margin]:right margin:' \
-    '-t[specify top margin]:top margin:' \
-    '-b[specify bottom margin]:bottom margin:' \
-    '-f[specify form length]:form length:' ':file: _pbm'
+    '-l[specify left margin]:left margin' \
+    '-r[specify right margin]:right margin' \
+    '-t[specify top margin]:top margin' \
+    '-b[specify bottom margin]:bottom margin' \
+    '-f[specify form length]:form length' ':file:_pbm'
   ;;
 
 pbmtolps)
-  _arguments '-dpi[specify output resolution]:resolution:' ':file: _pbm'
+  _arguments '-dpi[specify output resolution]:resolution' ':file:_pbm'
   ;;
 
 pbmtomacp)
   _arguments \
-    '-l[specify left offset]:left offset:' \
-    '-r[specify right offset]:right offset:' \
-    '-t[specify top offset]:top offset:' \
-    '-b[specify bottom offset]:bottom offset:' \
-    ':file: _pbm'
+    '-l[specify left offset]:left offset' \
+    '-r[specify right offset]:right offset' \
+    '-t[specify top offset]:top offset' \
+    '-b[specify bottom offset]:bottom offset' \
+    ':file:_pbm'
   ;;
 
 pbmtopgm)
-  _arguments ':width:' ':height:' ':file: _pbm'
+  _arguments ':width' ':height' ':file:_pbm'
   ;;
 
 pbmtopk)
-  # This could be improved...
-  
   _arguments \
-    '-s[set design size]:design size:' \
-    '-C[set coding scheme]:coding scheme:' \
-    '-F[set font family comment]:font family:' \
+    '-s[set design size]:design size' \
+    '-C[set coding scheme]:coding scheme' \
+    '-F[set font family comment]:font family' \
     '-f[specify file with options]:option file:_files' \
-    '*-c[specify next character number]:character number:' \
-    '*-W[specify TFM width of next character]:width:' \
-    '*-H[specify TFM height of next character]:height:' \
-    '*-D[specify TFM depth of next character]:depth:' \
-    '*-I[specify italic correction of next character]:italic correction:' \
-    '*-h[specify horizontal escapement of next character]:horizontal escapement:' \
-    '*-v[specify vertical escapement of next character]:vertical escapement:' \
-    '*-x[specify x offset of next character]:x offset:' \
-    '*-y[specify y offset of next character]:y offset:' \
+    '*-c[specify next character number]:character number' \
+    '*-W[specify TFM width of next character]:width' \
+    '*-H[specify TFM height of next character]:height' \
+    '*-D[specify TFM depth of next character]:depth' \
+    '*-I[specify italic correction of next character]:italic correction' \
+    '*-h[specify horizontal escapement of next character]:horizontal escapement' \
+    '*-v[specify vertical escapement of next character]:vertical escapement' \
+    '*-x[specify x offset of next character]:x offset' \
+    '*-y[specify y offset of next character]:y offset' \
     ':pk file:_files -g \*.\(\#i\)pk' \
     ':tfm file:_files -g \*.\(\#i\)tfm' \
-    '*:file: _pbm'
+    '*:file:_pbm'
   ;;
 
 pbmupc)
-  _arguments -s{1,2} ':product type:' ':manufacturer code:' \
-             ':product code:'
+  _arguments -s{1,2} ':product type' ':manufacturer code' ':product code'
   ;;
 
 pgmcrater)
   _arguments \
-    '-number[specify number of craters]:number of craters:' \
-    '-gamma[specify gamma correction factor]:gamma factor:' \
-    '(-ysize)-height[specify picture height]:height:' \
-    '(-height)-ysize[specify picture height]:height:' \
-    '(-xsize)-width[specify picture width]:width:' \
-    '(-width)-xsize[specify picture width]:width:'
+    '-number[specify number of craters]:number of craters' \
+    '-gamma[specify gamma correction factor]:gamma factor' \
+    '(-ysize)-height[specify picture height]:height' \
+    '(-height)-ysize[specify picture height]:height' \
+    '(-xsize)-width[specify picture width]:width' \
+    '(-width)-xsize[specify picture width]:width'
   ;;
 
 pgmkernel)
-  _arguments '-weight:weight:' ':width:' ':height:'
+  _arguments '-weight:weight' ':width' ':height'
   ;;
 
 pgmnoise)
-  _arguments ':width:' ':height:'
+  _arguments ':width' ':height'
   ;;
 
 pgmnorm|ppmnorm)
   _arguments \
-    '(-bvalue)-bpercent[specify percentage to map to black]:black percentage:' \
-    '(-bpercent)-bvalue[specify pixel value to map to black]:black pixel value:' \
-    '(-wvalue)-wpercent[specify percentage to map to white]:white percentage:' \
-    '(-wpercent)-wvalue[specify pixel value to map to white]:white pixel value:' \
-    ':file: _pbm'
+    '(-bvalue)-bpercent[specify percentage to map to black]:black percentage' \
+    '(-bpercent)-bvalue[specify pixel value to map to black]:black pixel value' \
+    '(-wvalue)-wpercent[specify percentage to map to white]:white percentage' \
+    '(-wpercent)-wvalue[specify pixel value to map to white]:white pixel value' \
+    ':file:_pbm'
   ;;
 
 pgmoil)
-  _arguments '-n[specify smear size]:smear size:' ':file: _pbm'
+  _arguments '-n[specify smear size]:smear size' ':file:_pbm'
   ;;
 
 pgmramp)
@@ -217,11 +230,11 @@ pgmramp)
     '(-lr -rectangle -ellipse)-tb[produce top to bottom ramp]' \
     '(-lr -tb -ellipse)-rectangle[produce rectangular ramp]' \
     '(-lr -tb -rectangle)-ellipse[produce elliptical ramp]' \
-    ':width:' ':height:'
+    ':width' ':height'
   ;;
 
 pgmtexture)
-  _arguments '-d[specify distance]:distance:' ':file: _pbm'
+  _arguments '-d[specify distance]:distance' ':file:_pbm'
   ;;
 
 pgmtopbm)
@@ -238,9 +251,9 @@ pgmtopbm)
     '(-floyd -fs -threshold -hilbert -dither8 -d8 -cluster3 -c3 -cluster4 -cluster8 -c8 -value -clump)-c4[use 45 degree clustered dither]' \
     '(-floyd -fs -threshold -hilbert -dither8 -d8 -cluster3 -c3 -cluster4 -c4 -c8 -value -clump)-cluster8[use 45 degree clustered dither]' \
     '(-floyd -fs -threshold -hilbert -dither8 -d8 -cluster3 -c3 -cluster4 -c4 -cluster8 -value -clump)-c8[use 45 degree clustered dither]' \
-    '-value[specify thresholding value]:threshold value:' \
-    '-clump[specify number of pixels per clump]:number of pixel:' \
-':file: _pbm'
+    '-value[specify thresholding value]:threshold value' \
+    '-clump[specify number of pixels per clump]:number of pixel' \
+    ':file:_pbm'
   ;;
 
 pgmtoppm)
@@ -250,9 +263,9 @@ pgmtoppm)
       return
     fi
     _x_color && ret=0
-  
+
     _wanted options expl option compadd - -map && ret=0
-  
+
     return ret
   elif [[ CURRENT -eq 3 && "$words[2]" = -map ]]; then
     _description files expl 'map file'
@@ -264,11 +277,19 @@ pgmtoppm)
 
 pktopbm)
   _arguments \
-    '*-x[set width of next bitmap]:width:' \
-    '*-y[set height of next bitmap]:height:' \
-    '*-c[set next character number]:character number:' \
+    '*-x[set width of next bitmap]:width' \
+    '*-y[set height of next bitmap]:height' \
+    '*-c[set next character number]:character number' \
     ':pk file:_files -g \*.\(\#i\)pk' \
-    '*:file: _pbm'
+    '*:file:_pbm'
+  ;;
+
+pngtopnm)
+  _arguments \
+    -{verbose,alpha,mix,time} \
+    '-background:color:_x_color' \
+    '-gamma:value' '-text:file:_files' \
+    ':file:_pbm'
   ;;
 
 pnmalias)
@@ -279,14 +300,14 @@ pnmalias)
     '(-fonly)-bonly[apply antialias only to background pixels]' \
     '(-balias)-falias[apply antialias to all pixels around foreground pixels]' \
     '(-falias)-balias[apply antialias to all pixels around foreground pixels]' \
-    '-weight[set central aliasing weight]:central aliasing weight:' \
-    ':file: _pbm'
+    '-weight[set central aliasing weight]:central aliasing weight' \
+    ':file:_pbm'
   ;;
 
 pnmarith)
   _arguments \
-    -{add,subtract,multiply,difference,minimum,maximum} \
-    '*:file: _pbm'
+    '(-)'-{add,subtract,multiply,difference,minimum,maximum} \
+    '*:file:_pbm'
   ;;
 
 pnmcat)
@@ -301,60 +322,62 @@ pnmcat)
     '(-topbottom -tb -jtop -jleft -jright)-jbottom[align pictures at bottom]' \
     '(-leftright -lr -jright -jtop -jbottom)-jleft[align pictures at left side]' \
     '(-leftright -lr -jleft -jtop -jbottom)-jright[align pictures at right side]' \
-    '*:file: _pbm'
+    '*:file:_pbm'
   ;;
 
 pnmcomp)
   _arguments \
     '-invert[invert overlay pixel values]' \
-    '-xoff[specify overlay x offset]:x offset:' \
-    '-yoff[specify overlay y offset]:y offset:' \
+    '(-align)-xoff[specify overlay x offset]:x offset' \
+    '(-valign)-yoff[specify overlay y offset]:y offset' \
+    '(-xoff)-align=[specify horizontal alignment for overlay image]:alignment:(left center right)' \
+    '(-yoff)-valign=[specify vertical alignment for overlay image]:alignment:(top middle bottom)' \
     '-alpha[specify alpha mask file]:alpha mask file:_files -g \*.\(\#i\)pgm' \
-    ':overlay file:_pbm' '*:file: _pbm'
+    ':overlay file:_pbm' '*:file:_pbm'
   ;;
 
 pnmconvol)
-  _arguments ':convolution file:_pbm' ':file: _pbm'
+  _arguments ':convolution file:_pbm' ':file:_pbm'
   ;;
 
 pnmcrop)
   _arguments \
     '(-black)-white' \
     '(-white)-black' \
+    -sides \
     -{left,right,top,bottom} \
-    ':file: _pbm'
+    -verbose \
+    ':file:_pbm'
   ;;
 
 pnmcut)
-  _arguments ':x position:' ':y position:' ':width:' ':height:' ':file: _pbm'
+  _arguments \
+    '-left:left col' '-right:right col' '-top:top col' '-bottom:bottom col' \
+    '-width:width' '-height:height' -pad -verbose \
+    ':x position' ':y position' ':width' ':height' ':file:_pbm'
   ;;
 
 pnmdepth)
-  _arguments ':new maximum value:' ':file: _pbm'
+  _arguments ':new maximum value' ':file:_pbm'
   ;;
 
 pnmenlarge)
-  _arguments ':enlargement factor:' ':file: _pbm'
+  _arguments ':enlargement factor' ':file:_pbm'
   ;;
 
 pnmflip)
-  _arguments \*-{leftright,lr,topbottom,tb,transpose,xy,rotate90,r90,ccw,rotate270,r270,cw} \
-             ':file: _pbm'
+  _arguments \
+    \*-{leftright,lr,topbottom,tb,transpose,xy,rotate90,r90,ccw,rotate270,r270,cw,rotate180,r180} \
+    ':file:_pbm'
   ;;
 
 pnmgamma)
-  if [[ CURRENT -eq 2 ]]; then
-    _message -e gamma-values 'gamma value or red gamma value'
-  elif [[ CURRENT -eq 3 ]]; then
-    _pbm && ret=0
-    _message -e gamma-values 'green gamma value'
-  elif [[ CURRENT -eq 4 ]]; then
-    _message -e gamma-values 'blue gamma value'
-  elif [[ CURRENT -eq 5 ]]; then
-    _pbm && ret=0
-  fi
-  
-  return ret
+  _arguments \
+    -ungamma -cieramp \
+    '1:gamma value or red gamma value' \
+    '2: :{ _message -e gamma-values "green gamma value";_pbm }' \
+    '3:blue gamma value' \
+    '4:file:_pbm'
   ;;
 
 pnmhisteq)
@@ -363,97 +386,126 @@ pnmhisteq)
     '-gray[modify only gray pixels]' \
     '-rmap[specify input luminosity map file]:luminosity map file:_files -g \*.\(\#i\)pgm' \
     '-wmap[specify output luminosity map file]:luminosity map file:_files -g \*.\(\#i\)pgm' \
-    ':file: _pbm'
+    ':file:_pbm'
   ;;
 pnmhistmap)
-  _arguments -{black,white,verbose} '-max:maximum value:' ':file: _pbm'
+  _arguments -{black,white,verbose} '-max:maximum value' ':file:_pbm'
   ;;
 
 pnmindex)
   _arguments \
-    '-size[set size of index pictures]:image size:' \
-    '-across[specify number of pictures per ros]:images per row:' \
-    '-colors[specify maximum number of colors]:number of colors:' \
+    '-size[set size of index pictures]:image size' \
+    '-across[specify number of pictures per ros]:images per row' \
+    '-colors[specify maximum number of colors]:number of colors' \
     '-black[use black padding]' \
-    '*:file: _pbm'
+    '-title[specify a title to place at the top of the image]:title' \
+    '(-noquant)-quant[enable quantization]' \
+    '(-quant)-noquant[disable quantization]' \
+    '*:file:_pbm'
   ;;
 
 pnmmargin)
   _arguments \
     '(-black -colors)-white' \
     '(-white -colors)-black' \
-    '(-white -black)-color:color: _x_color' \
-    ':border width:' \
-    ':file: _pbm'
+    '(-white -black)-color:color:_x_color' \
+    ':border width' \
+    ':file:_pbm'
   ;;
 
 pnmnlfilt)
-  _arguments ':alpha value:' ':radius:' ':file: _pbm'
+  _arguments ':alpha value' ':radius' ':file:_pbm'
   ;;
 
 pnmpad)
   _arguments \
     '(-white)-black[add black border]' \
     '(-black)-white[add white border]' \
-    '-l-[specify left border width]:left border width:' \
-    '-r-[specify right border width]:right border width:' \
-    '-t-[specify top border width]:top border width:' \
+    '-l-[specify left border width]:left border width' \
+    '-r-[specify right border width]:right border width' \
+    '-t-[specify top border width]:top border width' \
     '-b-[specify bottom border width]: :_guard "[0-9]#" "bottom border width"' \
-    ':file: _pbm'
+    ':file:_pbm'
   ;;
 
 pnmpaste)
   _arguments \
-    '(-or -and -xor)-replace' \
-    '(-replace -and -xor)-or' \
-    '(-replace -or -xor)-and' \
-    '(-replace -or -and)-xor' \
-     ':"from" picture file:_pbm' \
-    :{x,y}' position:' \
+    '(-)'{-replace,-or,-and,-xor} \
+    ':"from" picture file:_pbm' \
+    :{x,y}' position' \
     ':"into" picture file:_pbm'
   ;;
 
 pnmrotate)
-  _arguments '-noantialias' ':rotation angle:' ':file: _pbm'
+  _arguments '-noantialias' ':rotation angle' ':file:_pbm'
   ;;
 
 pnmscale)
-  local scale
-  
-  if [[ "$words[2]" = -* ]]; then
-    scale=()
-  else
-    scale=( ':scale factor:' )
-  fi
-  
+  local -a scale
+
+  [[ "$words[2]" = -* ]] || scale=( ':scale factor' )
+
   _arguments \
-    '(-width)-xsize:width:' \
-    '(-xsize)-width:width:' \
-    '(-height)-ysize:height:' \
-    '(-ysize)-height:height:' \
-    '-xscale:horizontal scale factor:' \
-    '-yscale:vertical scale factor:' \
-    '(-width -xsize -height -ysize -xscale -yscale -pixels)-xysize:width::height:' \
-    '(-width -xsize -height -ysize -xscale -yscale -xysize)-pixels:total number of pixels:' \
-    "$scale[@]" \
-    ':file: _pbm'
+    '(-)-reduce:reduction factor' \
+    '(-reduce -xysize -pixels -width -xscale)-xsize:width' \
+    '(-reduce -xysize -pixels -xsize -xscale)-width:width' \
+    '(-reduce -xysize -pixels -height -yscale)-ysize:height' \
+    '(-reduce -xysize -pixels -ysize -yscale)-height:height' \
+    '(-reduce -xysize -pixels -width -xsize)-xscale:horizontal scale factor' \
+    '(-reduce -xysize -pixels -height -ysize)-yscale:vertical scale factor' \
+    '(-width -xsize -height -ysize -xscale -yscale -pixels)-xysize:width::height' \
+    '(-width -xsize -height -ysize -xscale -yscale -xysize)-pixels:total number of pixels' \
+    '-verbose' "$scale[@]" \
+    ':file:_pbm'
   ;;
 
 pnmshear)
-  _arguments '-noantialias' ':shearing angle:' ':file: _pbm'
+  _arguments '-noantialias' ':shearing angle' ':file:_pbm'
   ;;
 
 pnmtile)
-  _arguments ':width:' ':height:' ':file: _pbm'
+  _arguments ':width' ':height' ':file:_pbm'
   ;;
 
 pnmtoddif)
-  _arguments '-resolution:horizontal resolution::vertical resolution:' \
-             ':file: _pbm' ':ddif file:_files -g \*.\(\#i\)ddif'
+  _arguments \
+    '-resolution:horizontal resolution::vertical resolution' \
+    ':file:_pbm' ':ddif file:_files -g \*.\(\#i\)ddif'
   ;;
 
 pnmtofits)
-  _arguments '-max:maximum value:' '-min:minimum value:' ':file: _pbm'
+  _arguments '-max:maximum value' '-min:minimum value' ':file:_pbm'
+  ;;
+
+pnmtojpeg)
+  _arguments \
+    '--exif=:file:_files' \
+    '--quality=:quality' \
+    --{grayscale,greyscale,optimize,progressive,verbose,baseline} \
+    '--comment=:comment' \
+    '--dct=:dct method:(int fast float)' \
+    '--restart=:rows' \
+    '--smooth=:strength' \
+    '--maxmemory=:memory use limit (kB)' \
+    '--qtables=:file:_files' \
+    '--qslots=:table' \
+    '--sample=:sampling factor' \
+    '--scans:file:_files' \
+    ':file:_pbm'
+  ;;
+
+pnmtopng)
+  _arguments \
+    -{verbose,downscale,interlace,hist,force} \
+    '-alpha:file:_files' '-gamma:value' \
+    '-transparent::color:_x_color' '-background:color:_x_color' \
+    '-chroma:wx::wy::rx::ry::gx::gy::bx::by' \
+    '-phys:x::y::unit' \
+    '-text:file:_files' '-ztxt:file:_files' \
+    '-time:date ([yy]yy-mm-dd)::time (hh:mm:ss)' \
+    '-filter:type:((0\:none 1\:sub 2\:up 3\:avg 4\:paeth))' \
+    '-compression:level:(0 1 2 3 4 5 6 7 8 9)' \
+    ':file:_pbm'
   ;;
 
 pnmtops)
@@ -461,20 +513,24 @@ pnmtops)
     '(-noturn)-turn' '(-turn)-noturn' \
     '(-nocenter)-center '(-center)-nocenter \
     '(-rle)-runlength' '(-runlength)-rle' \
-    '-scale:scale factor:' \
-    '-dpi:output resolution:' \
-    '-width:page width:' '-height:page height' ':file: _pbm'
+    '(-imagewidth -imageheight)-scale:scale factor' \
+    '-dpi:output resolution' \
+    '(-scale -equalpixels)-imagewidth:width on page (inches)' \
+    '(-scale -equalpixels)-imageheight:height on page (inches)' \
+    '-width:page width' '-height:page height' \
+    '(-imagewidth -imageheight)-equalpixels' \
+    ':file:_pbm'
   ;;
 
 pnmtorast)
-  _arguments '(-rle)-standard' '(-standard)-rle' ':file: _pbm'
+  _arguments '(-rle)-standard' '(-standard)-rle' ':file:_pbm'
   ;;
 
 pnmtosgi)
   _arguments \
     '(-rle)-verbatim' '(-verbatim)-rle' \
-    '-imagename:image name:' \
-    ':file: _pbm'
+    '-imagename:image name' \
+    ':file:_pbm'
   ;;
 
 pnmtotiff)
@@ -485,107 +541,118 @@ pnmtotiff)
     '(-none -packbits -lzw -g4 -predictor)-g3' \
     '(-none -packbits -lzw -g3 -2d -fill -predictor)-g4' \
     '-2d' \
-    '-fill' \
+    '-fill' '-minisblack' \
     '(-lsb2msb)-msb2lsb' \
     '(-msb2lsb)-lsb2msb' \
     '-predictor:LZW predictor:((1\:without\ differencing 2\:with\ differencing))' \
-    '-rowsperstrip:number of rows per strip:' ':file: _pbm'
+    '-rowsperstrip:number of rows per strip' ':file:_pbm'
   ;;
 
 pnmtoxwd)
-  _arguments '-pseudodepth:depth of PseudoColor dumps:' '-directcolor' \
-             ':file: _pbm'
+  _arguments \
+    '-pseudodepth:depth of PseudoColor dumps' '-directcolor' \
+    ':file:_pbm'
   ;;
 
 ppm3d)
-  _arguments :{left,right}' picture file:_pbm' ':horizontal offset:'
+  _arguments :{left,right}' picture file:_pbm' ':horizontal offset'
   ;;
 
 ppmbrighten)
   _arguments \
     '-n[normalize value]' \
-    '-s[specify saturation difference]:saturation difference:' \
-    '-v[specify value difference]:value difference:' \
-    ':file: _pbm'
+    '-s[specify saturation difference]:saturation difference' \
+    '-v[specify value difference]:value difference' \
+    ':file:_pbm'
   ;;
 
 ppmchange)
-  _pbm && ret=0
-  
-  if (( CURRENT & 1 )); then
-    _description colors expl 'new color'
-  else
-    _description colors expl 'old color'
+  local curcontext="$curcontext" state line
+
+  _arguments -C \
+    "-closeness[specify how close a pixel's color should be]:closeness (percent)" \
+    '-remainder[specify replacement for colours not given explicit replacement]:color:_x_color' \
+    '*: :->args' && ret=0
+
+  if [[ -n "$state" ]]; then
+    if (( CURRENT & 1 )); then
+      _wanted colors expl 'new color' _x_color && ret=0
+    else
+      _alternative \
+	'files:file:_pbm' \
+	'colors:old color:_x_color' && ret=0
+    fi
   fi
-  
-  _x_color "$expl[@]" && ret=0
-  
+
   return ret
   ;;
 
 ppmdim)
-  _arguments ':diminishing factor:' ':file: _pbm'
+  _arguments ':diminishing factor' ':file:_pbm'
   ;;
 
 ppmdist)
   _arguments \
     '(-frequency)-intensity[sort colors by grayscale intensity]' \
     '(-intensity)-frequency[sort colors by frequency]' \
-    ':file: _pbm'
+    ':file:_pbm'
   ;;
 
 ppmdither)
-  _arguments '-dim:matrix size:' \
-             '-red:number of red shades:' \
-             '-green:number of green shades:' \
-             '-blue:number of blue shades:' \
-             ':file: _pbm'
+  _arguments \
+    '-dim:matrix size' \
+    '-red:number of red shades' \
+    '-green:number of green shades' \
+    '-blue:number of blue shades' \
+    ':file:_pbm'
   ;;
 
 ppmflash)
-  _arguments ':flash factor:' ':file: _pbm'
+  _arguments ':flash factor' ':file:_pbm'
   ;;
 
 ppmforge)
-  _arguments -{clouds,night} \
-             '-dimension:fractal dimension:' '-hour:hour angle:' \
-             '(-tilt)-inclination:inclination angle:' \
-             '(-inclination)-tilt:inclination angle:' \
-             '-mesh:FFT mesh size:' '-power:elevations power factor:' \
-             '-glaciers:glacier elevation:' '-ice:polar ice cap extent:' \
-             '-saturation:star color saturation:' \
-             '-seed:random number seed:' \
-             '-stars:minimum star pixel percentage:' \
- 	     '(-xsize)-width:width:'   '(-width)-xsize:width:' \
- 	     '(-ysize)-height:height:' '(-height)-ysize:height:'
+  _arguments \
+    -{clouds,night} \
+    '-dimension:fractal dimension' '-hour:hour angle' \
+    '(-tilt)-inclination:inclination angle' \
+    '(-inclination)-tilt:inclination angle' \
+    '-mesh:FFT mesh size' '-power:elevations power factor' \
+    '-glaciers:glacier elevation' '-ice:polar ice cap extent' \
+    '-saturation:star color saturation' \
+    '-seed:random number seed' \
+    '-stars:minimum star pixel percentage' \
+    '(-xsize)-width:width'   '(-width)-xsize:width' \
+    '(-ysize)-height:height' '(-height)-ysize:height'
   ;;
 
 ppmmake)
-  _arguments ':color: _x_color' ':width:' ':height:'
+  _arguments ':color:_x_color' ':width' ':height'
   ;;
 
 ppmmix)
-  _arguments ':fade factor:' ':file: _pbm' ':file: _pbm'
+  _arguments ':fade factor' ':file:_pbm' ':file:_pbm'
   ;;
 
 ppmntsc)
-  _arguments ':dim factor:' ':file: _pbm'
+  _arguments ':dim factor' ':file:_pbm'
   ;;
 
 ppmpat)
-  _arguments '(gingham2 -gingham3 -g2 -g3 -madras -tartan -poles -squig -camo -anticamo)'-{gingham{2,3},g{2,3},madras,tartan,poles,squig,camo,anticamo} \
-             ':width:' ':height:'
+  _arguments \
+    '(-)'-{gingham{2,3},g{2,3},madras,tartan,poles,squig,camo,anticamo} \
+    ':width' ':height'
   ;;
 
 ppmquant)
   local opt=yes
-  
+
   if [[ "$words[2]" = -(fs|floyd) ]]; then
     (( CURRENT-- ))
     shift 1 words
     opt=''
   fi
-  
+
   if [[ CURRENT -eq 2 ]]; then
     if [[ -n "$opt" ]]; then
       _wanted options expl option compadd - -map -fs -floyd && ret=0
@@ -593,7 +660,7 @@ ppmquant)
       _wanted options expl option compadd - -map && ret=0
     fi
     _message -e numbers 'number of colors'
-  
+
     return ret
   elif [[ CURRENT -eq 3 && "$words[2]" = -map ]]; then
     _description files expl 'map file'
@@ -604,15 +671,17 @@ ppmquant)
   ;;
 
 ppmquantall)
-  _arguments ':number of colors:' '*:file: _pbm'
+  _arguments \
+    '-ext:extension' ': :_guard "[0-9]#" "number of colors"' \
+    '*:file:_pbm'
   ;;
 
 ppmshift)
-  _arguments ':shift value:' ':file: _pbm'
+  _arguments ':shift value' ':file:_pbm'
   ;;
 
 ppmspread)
-  _arguments ':maximum spread amount:' ':file: _pbm'
+  _arguments ':maximum spread amount' ':file:_pbm'
   ;;
 
 ppmtoacad)
@@ -621,80 +690,115 @@ ppmtoacad)
     '(-dxb)-poly[render pixels as filled polygons]' \
     '-8[restrict colors to the 8 RGB shades]' \
     '(-background)-white[use white background]' \
-    '(-white)-background:background color (0-255):' \
-    '-aspect:pixel aspect ratio:' \
-    ':file: _pbm'
+    '(-white)-background:background color (0-255)' \
+    '-aspect:pixel aspect ratio' \
+    ':file:_pbm'
   ;;
 
 ppmtobmp)
-  _arguments '(-windows)-os2' '(-os2)-windows' ':file: _pbm'
+  _arguments \
+    '(-windows)-os2' '(-os2)-windows' \
+    '-bpp[secify bits per pixel for BMP file]:bits per pixel:(1 4 8 24)' \
+    ':file:_pbm'
   ;;
 
 ppmtogif)
-  _arguments '-interlace' ':file: _pbm'
+  _arguments \
+    '-interlace[produce interlaced GIF]' \
+    '-sort[produce GIF with sorted color map]' \
+    '-map[use colors in specified file]:map file:_files' \
+    '(-alpha)-transparent[specify transparent color]:color' \
+    '(-transparent)-alpha[specify PGM file containing alpha mask]:file:_pbm' \
+    '-comment[include a comment in the GIF file]:comment text' \
+    '-nolxw[skip LZW compression]' \
+    ':file:_pbm'
   ;;
 
 ppmtoicr)
-  _arguments '-windowname:window name:' '-expand:expansion factor:' \
-             '-display:display screen:' '-rle' ':file: _pbm'
+  _arguments \
+    '-windowname:window name' '-expand:expansion factor' \
+    '-display:display screen' '-rle' ':file:_pbm'
   ;;
 
 ppmtoilbm)
-  _arguments '-hamif' ':file: _pbm'
+  _arguments \
+    '(-mp -maxplanes)'{-mp,-maxplanes}':planes' \
+    '(-fp -fixplanes)'{-fp,-fixplanes}':planes' \
+    '(-hambits -hamplanes)'{-hambits,-hamplanes}':planes' \
+    -normal -hamif -24if -dcif -hamforce -24force -dcforce \
+    '(-dcbits -dcplanes)'{-dcbits,-dcplanes}':bits for red: :bits for green: :bits for blue' \
+    -ecs -aga -ham6 -ham8 -compress '-cmethod:method:(none byterun1)' \
+    '-map:ppm file:_pbm' -cmaponly -savemem \
+    ':file:_pbm'
   ;;
 
 ppmtomap)
-  _arguments -s{ort,quare} ':file: _pbm'
+  _arguments -s{ort,quare} ':file:_pbm'
   ;;
 
 ppmtomitsu)
-  _arguments '-sharpness:sharpness:(1 2 3 4)' \
-             '-enlarge:enlargement factor:(1 2 3)' \
-             '-media:output media (default\: 1184x1350):((A\:1216x1350 A4\:1184x1452 AS\:1216x1650 A4S\:1184x1754))' \
-             '-copy:number of copies:(1 2 3 4 5 6 7 8 9)' \
-             -{dpi300,tiny} ':file: _pbm'
+  _arguments \
+    '-sharpness:sharpness:(1 2 3 4)' \
+    '-enlarge:enlargement factor:(1 2 3)' \
+    '-media:output media (default\: 1184x1350):((A\:1216x1350 A4\:1184x1452 AS\:1216x1650 A4S\:1184x1754))' \
+    '-copy:number of copies:(1 2 3 4 5 6 7 8 9)' \
+    -{dpi300,tiny} ':file:_pbm'
+  ;;
+
+ppmtopcx)
+  _arguments -{24bit,packed} ':file:_pbm'
   ;;
 
 ppmtopj)
-  _arguments '-gamma:gamma value:' '-xpos:x position:' -{rle,center} \
-             '-ypos:y position:' '-back:background brightness:(dark lite)' \
-             '-render:rendering algorithm:(none snap bw dither diffuse monodither monodiffuse clusterdither monoclusterdither)' \
-             ':file: _pbm'
+  _arguments \
+    '-gamma:gamma value' '-xpos:x position' -{rle,center} \
+    '-ypos:y position' '-back:background brightness:(dark lite)' \
+    '-render:rendering algorithm:(none snap bw dither diffuse monodither monodiffuse clusterdither monoclusterdither)' \
+    ':file:_pbm'
   ;;
 
 ppmtopjxl)
   _arguments \
     -{nopack,presentation,dark,diffuse,cluster,dither} \
-    '-gamma:gamma value:' \
-    '-xshift:x shift:' '-yshift:y shift:' \
-    '(-width -xscale)-xscale:width:' \
-    '(-xsize -xscale)-width:width:' \
-    '(-xsize -width)-xscale:horizontal scale factor:' \
-    '(-height -yscale)-ysize:height:' \
-    '(-ysize -yscale)-height:height:' \
-    '(-ysize -height)-yscale:vertical scale factor:' \
-    ':file: _pbm'
+    '-gamma:gamma value' \
+    '-xshift:x shift' '-yshift:y shift' \
+    '(-width -xscale)-xscale:width' \
+    '(-xsize -xscale)-width:width' \
+    '(-xsize -width)-xscale:horizontal scale factor' \
+    '(-height -yscale)-ysize:height' \
+    '(-ysize -yscale)-height:height' \
+    '(-ysize -height)-yscale:vertical scale factor' \
+    ':file:_pbm'
   ;;
 
 ppmtosixel)
-  _arguments -{raw,margin} ':file: _pbm'
+  _arguments -{raw,margin} ':file:_pbm'
   ;;
 
 ppmtotga)
-  _arguments -{mono,cmap,rgb,norle} ':file: _pbm'
+  _arguments -{mono,cmap,rgb,norle} ':file:_pbm'
+  ;;
+
+ppmtouil)
+  _arguments '-name:name prefix' ':file:_pbm'
   ;;
 
-ppmtouil|ppmtoxpm)
-  _arguments '-name:name prefix:' ':file: _pbm'
+ppmtorle)
+  _arguments \
+    '-name=:name prefix' \
+    '-rgb=:X11 rgb file:_files' \
+    '-alphamask=:pgm file:_pbm' \
+    ':file:_pbm'
   ;;
 
 ppmtoyuvsplit)
-  _arguments ':base name:' ':file: _pbm'
+  _arguments ':base name' ':file:_pbm'
   ;;
 
 psidtopgm)
-  _arguments ':width:' ':height:' ':bits per sample:' \
-             ':postscript file:_files -g \*.\(\#i\)\(ps\|eps\)'
+  _arguments \
+    ':width' ':height' ':bits per sample' \
+    ':postscript file:_files -g "*.(#i)(ps|eps)"'
   ;;
 pstopnm)
   _arguments \
@@ -704,28 +808,33 @@ pstopnm)
     '(-pbm -ppm)-pgm' \
     '(-pbm -pgm)-ppm' \
     -{forceplain,help,nocrop,verbose} \
-    '-llx:loxer left x position:' '-lly:lower left y position:' \
-    '-urx:upper right x position:' '-ury:upper right y position:' \
-    '-xborder:x border fraction:' '-yborder:y border fraction:' \
-    '-xmax:maximum width:' '-ymax:maximum height' \
-    '-xsize:width:' '-ysize:height:' \
+    '-llx:loxer left x position' '-lly:lower left y position' \
+    '-urx:upper right x position' '-ury:upper right y position' \
+    '-xborder:x border fraction' '-yborder:y border fraction' \
+    '-xmax:maximum width' '-ymax:maximum height' \
+    '-xsize:width' '-ysize:height' \
     ':postscript file:_files -g \*.\(\#i\)\(ps\|eps\)'
   ;;
 
 rawtopgm)
-  _arguments '-headerskip:header bytes to skip:' \
-             '-rowskip:row padding to skip:' \
-             ':width:' ':height:' ':grayscale bytes:'
+  _arguments \
+    '-maxval:value' \
+    '-bpp:bytes:(1 2)' \
+    -littleendian \
+    '(-bt -bottomfirst -rowskip)-'{bt,bottomfirst} \
+    '-headerskip:header bytes to skip' \
+    '(-bt -bottomfirst)-rowskip:row padding to skip' \
+    ': :_guard "[0-9]#" width' ':height' ':grayscale bytes'
   ;;
 
 rawtoppm)
   _arguments \
-    '-headerskip:header bytes to skip:' \
-    '-rowskip:row padding to skip:' \
+    '-headerskip:header bytes to skip' \
+    '-rowskip:row padding to skip' \
     '(-rgb -rbg -grb -gbr -brg -bgr)'-{rgb,rbg,grb,gbr,brg,bgr} \
     '(-interrow)-interpixel' \
     '(-interpixel)-interrow' \
-    ':width:' ':height:' ':grayscale bytes:'
+    ': :_guard "[0-9]#" width' ':height' ':grayscale bytes'
   ;;
 
 rgb3toppm)
@@ -736,36 +845,44 @@ rgb3toppm)
   elif [[ CURRENT -eq 4 ]]; then
     expl='blue picture file'
   fi
-  
+
   if [[ -n "$expl" ]]; then
     _description files expl "$expl"
     _files "$expl" -g '*.(#i)pgm'
   fi
   ;;
 
+rletopnm)
+  _arguments \
+    '--alphaout=:alpha file:_pbm' \
+    -{h,-headerdump,v,-verbose,p,-plain} \
+    ':file:_pbm'
+  ;;
+
 sgitopnm)
-  _arguments '-verbose' ':file: _pbm'
+  _arguments '-verbose' '-channel:channel' ':file:_pbm'
   ;;
 
 sldtoppm)
-  _arguments -{adjust,dir,info,verbose} \
-             '(-width -xsize)'-{width,xsize}:width: \
-             '(-height -ysize)'-{height,ysize}:height: \
-             '-scale:scale factor:' \
-             '(-lib -Lib)'-{l,L}'ib:slide name:' \
-             ':file: _pbm'
+  _arguments \
+    -{adjust,dir,info,verbose} \
+    '(-width -xsize)'-{width,xsize}:width \
+    '(-height -ysize)'-{height,ysize}:height \
+    '-scale:scale factor' \
+    '(-lib -Lib)'-{l,L}'ib:slide name' \
+    ':file:_pbm'
   ;;
 
 yuvsplittoppm)
-  _arguments ':base name:' ':width:' ':height:' '-ccir601'
+  _arguments ':base name' ':width' ':height' '-ccir601'
   ;;
 
 yuvtoppm)
-  _arguments ':width:' ':height:' ':image bytes:'
+  _arguments ':width' ':height' ':image bytes'
   ;;
 
 zeisstopnm)
-  _arguments '(-pgm -ppm)'-p{g,p}m ':file: _pbm'
+  _arguments '(-pgm -ppm)'-p{g,p}m ':file:_pbm'
   ;;
 
 *)
diff --git a/Completion/Unix/Command/_rar b/Completion/Unix/Command/_rar
index 73b8db3d4..910989437 100644
--- a/Completion/Unix/Command/_rar
+++ b/Completion/Unix/Command/_rar
@@ -1,137 +1,88 @@
 #compdef rar unrar
 
+local common
 
-_rar(){
-    case $service in
-        rar)
-        _arguments -s \
-        '*::rar command:_rar_command' 
-        ;;
-    unrar)
-        _arguments -s \
-        '*::unrar command:_unrar_command'
-        ;;
-    esac
-}
+common=(
+  '-ad[append archive name to destination path]'
+  '-ap[set path inside archive]'
+  '-av\-[disable authenticity verification check]'
+  '-c\-[disable comments show]'
+  '-cfg\-[disable read configuration]'
+  '-cl\-[convert names to lower case]'
+  '-cu[convert names to upper case]'
+  '-dh[open shared files]'
+  '-ep[exclude paths from name]'
+  '-f[freshen files]'
+  '-idp[disable percentage display]'
+  '-ierr[send all messages to stderr]'
+  '-inul[disable all messages]'
+  '-kb[keep broken extracted files]'
+  '-o\+[overwrite existing files]'
+  '-o\-[do not overwrite existing files]'
+  '-ow[save or restore file owner and group]'
+  '-p\-[do not query password]'
+  '-r[recurse subdirectorie]'
+  '-ta[process files modified after <date> in YYYYMMDDHHMMSS format]'
+  '-tb[process files modified before <date> in YYYYMMDDHHMMSS format]'
+  '-tn[process files newer than <time>]'
+  '-to[process files older than <time>]'
+  '-u[update files]'
+  '-v[create volumes with size autodetection or list all volumes]'
+  '-ver[file version control]'
+  '-vp[pause before each volume]'
+  '-x[exclude specified file]'
+  '-y[assume yes answer to all queries]'
+)
 
-_compression_level() {
-    compression_level=
-    _tags compression_level && { compadd "$@" -k compression_level || compadd "$@" ${(kv)=compression_level} }
-}
-
-_dico_size() {
-    dico_size=(64 128 256 512 1024 2048 4096 a b c d e f g)
-    _tags dico_size && { compadd "$@" -k dico_size || compadd "$@" ${(kv)=dico_size} }
-}
-
-_unrar_command () {
-    cmd=(e l lt p t v vt x)
-    if (( CURRENT == 1 ));then
-        _tags cmd && { compadd "$@" -k cmd || compadd "$@" ${(kv)=cmd} }
+case $service in
+  unrar)
+    if (( CURRENT == 2 )); then
+      _wanted commands expl 'rar command' compadd e l lt p t v vt x && return
     else
-        _arguments -C  \
-            '-ad[Append archive name to destination path]'\
-            '-ap[Set path inside archive]'\
-            '-av\-[Disable authenticity verification check]'\
-            '-c\-[Disable comments show]'\
-            '-cfg\-[Disable read configuration]'\
-            '-cl\-[Convert names to lower case]'\
-            '-cu[Convert names to upper case]'\
-            '-dh[Open shared files]'\
-            '-ep[Exclude paths from name]'\
-            '-f[Freshen files]'\
-            '-idp[Disable percentage display]'\
-            '-ierr[Send all messages to stderr]'\
-            '-inul[Disable all messages]'\
-            '-kb[Keep broken extracted files]'\
-            '-o\+[Overwrite existing files]'\
-            '-o\-[Do not overwrite existing files]'\
-            '-ow[Save or restore file owner and group]'\
-            '-p\-[Do not query password]'\
-            '-r[Recurse subdirectorie]'\
-            '-ta[Process files modified after <date> in YYYYMMDDHHMMSS format]'\
-            '-tb[Process files modified before <date> in YYYYMMDDHHMMSS format]'\
-            '-tn[Process files newer than <time>]'\
-            '-to[Process files older than <time>]'\
-            '-u[Update files]'\
-            '-v[Create volumes with size autodetection or list all volumes]'\
-            '-ver[File version control]'\
-            '-vp[Pause before each volume]'\
-            '-x[Exclude specified file]'\
-            '-y[Assume Yes on all queries]'\
-            '*:RAR files:_files -g \*.rar' && return 0
+      _arguments "$common[@]" '*:RAR files:_files -g \*.rar' && return
     fi
-}
-
-_rar_command () {
-    cmd=(a c cf cw d e f i k l lt m mf p r rc rr rv s t u v vt x)
-    if (( CURRENT == 1 ));then
-        _tags cmd && { compadd "$@" -k cmd || compadd "$@" ${(kv)=cmd} }
+  ;;
+  rar)
+    if (( CURRENT == 2 )); then
+      _wanted commands expl 'rar command' compadd \
+	  a c cf cw d e f i k l lt m mf p r rc rr rv s t u v vt x && return
     else
-        _arguments -s \
-            '-ad[Append archive name to destination path]'\
-            '-ag[Generate archive name using the current date]'\
-            '-ap[Set path inside archive]'\
-            '-as[Synchronize archive contents]'\
-            '-av[Put authenticity verification (registered versions only)]'\
-            '-av\-[Disable authenticity verification check]'\
-            '-c\-[Disable comments show]'\
-            '-cfg\-[Disable read configuration]'\
-            '-cl\-[Convert names to lower case]'\
-            '-cu[Convert names to upper case]'\
-            '-df[Delete files after archiving]'\
-            '-dh[Open shared files]'\
-            '-ds[Disable name sort for solid archive]'\
-            '-e[Set file exclude attributes]'\
-            '-ed[Do not add empty directories]'\
-            '-en[Do not put end of archive block]'\
-            '-ep[Exclude paths from name]'\
-            '-ep1[Exclude base directory from names]'\
-            '-ep2[Expand paths to full]'\
-            '-f[Freshen files]'\
-            '-hp[Encrypt both file data and headers]'\
-            '-idp[Disable percentage display]'\
-            '-ierr[Send all messages to stderr]'\
-            '-ilog[Log errors to file (registered versions only)]'\
-            '-inul[Disable all messages]'\
-            '-isnd[Enable sound]'\
-            '-k[Lock archive]'\
-            '-kb[Keep broken extracted files]'\
-            '-m+[Set compression level (0-store...3-default...5-maximal)]:compression level:(( 0\:store 1\:fastest 2\:fast 3\:normal 4\:good 5\:maximal ))'\
-            '-md+[Dictionary size in KB]:dictionaty size in KB:_dico_size' \
-            '-ms[Specify file types to store]'\
-            '-o\+[Overwrite existing files]'\
-            '-o\-[Do not overwrite existing files]'\
-            '-ol[Save symbolic links as the link instead of the file]'\
-            '-ow[Save or restore file owner and group]'\
-            '-p[Set password]'\
-            '-p\-[Do not query password]'\
-            '-r[Recurse subdirectorie]'\
-            '-r0[Recurse subdirectories for wildcard names only]'\
-            '-rr[Add data recovery record]'\
-            '-rv[Create recovery volumes]'\
-            '-s[Create solid archive]'\
-            '-se[Create solid archive using extension]'\
-            '-sv[Create solid archive using volumes]'\
-            '-s\-[Disable solid archiving]'\
-            '-sfx[Create SFX archive]'\
-            '-t[Test files after archiving]'\
-            '-ta[Process files modified after <date> in YYYYMMDDHHMMSS format]'\
-            '-tb[Process files modified before <date> in YYYYMMDDHHMMSS format]'\
-            '-tk[Keep original archive time]'\
-            '-tl[Set archive time to latest file]'\
-            '-tn[Process files newer than <time>]'\
-            '-to[Process files older than <time>]'\
-            '-u[Update files]'\
-            '-v[Create volumes with size autodetection or list all volumes]'\
-            '-ver[File version control]'\
-            '-vn[Use the old style volume naming scheme]'\
-            '-vp[Pause before each volume]'\
-            '-w+[Assign work directory]:work directory:_files -/'\
-            '-x[Exclude specified file]'\
-            '-y[Assume Yes on all queries]'\
-            '-z+[Read archive comment from file]:comment file:_files' \
-            '*:files:_files'
+      _arguments -s \
+	'-ag[generate archive name using the current date]' \
+	'-as[synchronize archive contents]' \
+	'-av[put authenticity verification (registered versions only)]' \
+	'-df[delete files after archiving]' \
+	'-ds[disable name sort for solid archive]' \
+	'-e[set file exclude attributes]' \
+	'-ed[do not add empty directories]' \
+	'-en[do not put end of archive block]' \
+	'-ep1[exclude base directory from names]' \
+	'-ep2[expand paths to full]' \
+	'-hp[encrypt both file data and headers]' \
+	'-ilog[log errors to file (registered versions only)]' \
+	'-isnd[enable sound]' \
+	'-k[lock archive]' \
+	'-m+[set compression level]:compression level:(( 0\:store 1\:fastest 2\:fast 3\:normal 4\:good 5\:maximal ))' \
+	'-md+[dictionary size]:dictionary size (KB):( 64 128 256 512 1024 2048 4096 a b c d e f g )' \
+	'-ms[specify file types to store]' \
+	'-ol[save symbolic links as the link instead of the file]' \
+	'-p[set password]' \
+	'-r0[recurse subdirectories for wildcard names only]' \
+	'-rr[add data recovery record]' \
+	'-rv[create recovery volumes]' \
+	'-s[create solid archive]' \
+	'-se[create solid archive using extension]' \
+	'-sv[create solid archive using volumes]' \
+	'-s\-[disable solid archiving]' \
+	'-sfx[create SFX archive]' \
+	'-t[test files after archiving]' \
+	'-tk[keep original archive time]' \
+	'-tl[set archive time to latest file]' \
+	'-vn[use the old style volume naming scheme]' \
+	'-w+[assign work directory]:work directory:_files -/' \
+	"$common[@]" \
+	'-z+[read archive comment from file]:comment file:_files' \
+	'*:files:_files' && return
     fi
-}
-_rar "$@"
+  ;;
+esac
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index b6fa296a1..ee05f4841 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -15,7 +15,7 @@ if [[ -prefix *::*/ ]]; then
 
     _wanted files expl 'remote files and directories' \
       compadd -d remdispf ${remdispf##* }
-      
+
     _wanted files expl 'remote files and directories' \
       compadd -S/ -d remdispd ${remdispd##* }
 
@@ -45,7 +45,7 @@ elif [[ -prefix 1 *: ]]; then
 
     _wanted files expl 'remote files and directories' \
       compadd -d remdispf ${${remfiles:#*/}/[*=@|](#e)/}
-      
+
     _wanted files expl 'remote files and directories' \
       compadd -S/ -d remdispd ${${(M)remfiles:#*/}/${slash}(#e)/}
   else
@@ -61,118 +61,91 @@ elif [[ -prefix 1 *@ ]]; then
   _wanted -C user-at hosts expl "host for $user" \
       _combination -s '[:@]' "${tag}" users-hosts users="$user" hosts -S "$suf" "$@" -
 else
-   if compset -S '@*'; then
-      _wanted users expl "user" \
-        _combination -s '[:@]' "${tag}" users-hosts users -q "$@" -
-   else
-	_hosts -S:
-   fi
-
+  if compset -S '@*'; then
+    _wanted users expl "user" \
+	_combination -s '[:@]' "${tag}" users-hosts users -q "$@" -
+  else
+    _alternative 'user:users:_users -S @' 'host:hosts:_hosts -S:'
+  fi
 fi
 
 }
 
 _rsync_files() {
-_files || _rsync_remote_files
+  _alternative "file:files:_files" "remote-files:remote files:_rsync_remote_files"
 }
 
-
-_arguments -C -s \
-	'*:files:_rsync_files' \
- 	'(--verbose)-v[verbose]' \
- 	'(-v)--verbose' \
- 	'(--quiet)-q[quiet]' \
- 	'(-q)--quiet' \
- 	'(--checksum)-c[always checksum]' \
- 	'(-c)--checksum[always checksum]' \
- 	'(--archive)-a[archive mode]' \
- 	'(-a)--archive[archive mode]' \
- 	'(--recursive)-r[recurse into directories]' \
- 	'(-r)--recursive[recurse into directories]' \
- 	'(--relative)-R[use relative path names]' \
- 	'(-R)--relative[use relative path names]' \
- 	'(--backup)-b[make backups]' \
- 	'(-b)--backup[make backups]' \
- 	'--backup-dir[make backups into this directory]:backup directory:_files -/' \
-	'--suffix=[override backup suffix]:suffix:' \
- 	'(--update)-u[update only]' \
- 	'(-u)--update[update only]' \
- 	'(--links)-l[copy symlinks as symlinks]' \
- 	'(-l)--links[copy symlinks as symlinks]' \
- 	'(--copy-links)-L[copy referent of symlinks]' \
- 	'(-L)--copy-links[copy referent of symlinks]' \
- 	'--copy-unsafe-links[copy links outside the source tree]' \
- 	'--safe-links[ignore links outside the destination tree]' \
- 	'(--hard-links)-H[preserve hard links]' \
- 	'(-H)--hard-links[preserve hard links]' \
- 	'(--perms)-p[preserve permissions]' \
- 	'(-p)--perms[preserve permissions]' \
- 	'(--owner)-o[preserve owner]' \
- 	'(-o)--owner[preserve owner]' \
- 	'(--group)-g[preserve group]' \
- 	'(-g)--group[preserve group]' \
- 	'(--devices)-D[preserve devices]' \
- 	'(-D)--devices[preserve devices]' \
- 	'(--times)-t[preserve times]' \
- 	'(-t)--times[preserve times]' \
- 	'(--sparse)-S[handle sparse files efficiently]' \
- 	'(-S)--sparse[handle sparse files efficiently]' \
- 	'(--dry-run)-n[show what would have been transferred]' \
- 	'(-n)--dry-run[show what would have been transferred]' \
- 	'(--whole-file)-W[copy whole files]' \
- 	'(-W)--whole-file[copy whole files]' \
- 	'(--one-file-system)-x[do not cross filesystem boundaries]' \
- 	'(-x)--one-file-system[do not cross filesystem boundaries]' \
- 	'(--block-size)-B[checksum blocking size]:block size:' \
- 	'(-B)--block-size=[checksum blocking size]:block size:' \
- 	'(--rsh)-e[rsh command]:remote command:(rsh ssh)' \
- 	'(-e)--rsh[rsh command]:remote command:(rsh ssh)' \
-	'--rsync-path=[specify path to rsync on the remote machine]:remote command:' \
- 	'(--cvs-exclude)-C[autoignore files in the same way as CVS]' \
- 	'(-C)--cvs-exclude[autoignore files in the same way as CVS]' \
-	'--existing[only update files that already exist]' \
-	'--ignore-existing[ignore files that already exist on the receiving side]' \
-	'--delete[delete files that do not exist on the sending side]' \
-	'--delete-excluded[also delete excluded files on the receiving side]' \
-	'--delete-after[perform delete after transferring]' \
-	'--ignore-errors[delete even if there are IO errors]' \
-	'--max-delete=[do not delete more than NUM files]:number:' \
-	'--partial[keep partially transferred files]' \
-	'--force[force deletion of directories even if not empty]' \
-	'--numeric-ids[do not map uid/gid values by user/group name]' \
-	'--timeout=[set IO timeout in seconds]:seconds:' \
- 	'(--ignore-times)-I[do not exclude files that match length and time]' \
- 	'(-I)--ignore-times[do not exclude files that match length and time]' \
-	'--size-only[only use file size when determining if a file should be transferred]' \
-	'--modify-window=[timestamp window for file match]:seconds:' \
-	'(--temp-dir)-T[create temporary files in specified directory]:directory:_files -/' \
-	'(-T)--temp-dir=[create temporary files in specified directory]:directory:_files -/' \
-	'--compare-dest=[also compare destination files relative to specified directory]:directory:_files -/' \
-	'-P[equivalent to --partial --progress]' \
- 	'(--compress)-z[compress file data]' \
- 	'(-z)--compress[compress file data]' \
-	'--exclude=[exclude files matching pattern]:pattern:' \
-	'--exclude-from=[exclude patterns listed in file]:file:_files' \
-	'--include=[do not exclude files matching pattern]:pattern:' \
-	'--include-from=[do not exclude patterns listed in file]:file:_files' \
-	'--version[print version number]' \
-	'--daemon[run as a rsync daemon]' \
-	'--no-detach[do not detach from the parent]' \
-	'--address=[bind to the specified address]:address:_hosts' \
-	'--config=[specify alternate rsyncd.conf file]:file:_files' \
-	'--port=[specify alternate rsyncd port number]:port:' \
-	'--blocking-io[use blocking IO for the remote shell]' \
-	'--stats[give some file transfer stats]' \
-	'--progress[show progress during transfer]' \
-	'--log-format=[log file transfers using specified format]:format:' \
-	'--password-file=[get password from file]:file:_files' \
-	'--bwlimit=[limit bandwidth]:kbytes per second:' \
-	'--read-batch=[read batch file]:ext:' \
-	'--write-batch[write batch file]' \
- 	'(--help)-h[help]' \
- 	'(-h)--help[help]' \
- 	'-4[prefer IPv4]' \
- 	'-6[prefer IPv6]' \
-	   -- '*=COMMAND*:command:_command' \
-              '*=FILE*:file:_files' \
-              '*=DIR*:directory:_files -/'
+_arguments -s \
+  '*: :_rsync_files' \
+  '*'{-v,--verbose}'[increase verbosity]' \
+  '(-q --quiet)'{-q,--quiet}'[show less information during transfer]' \
+  '(-c --checksum)'{-c,--checksum}'[always checksum]' \
+  '(-a --archive)'{-a,--archive}'[archive mode]' \
+  '(-r --recursive)'{-r,--recursive}'[recurse into directories]' \
+  '(-E --relative)'{-R,--relative}'[use relative path names]' \
+  '(-b --backup)'{-b,--backup}'[make backups]' \
+  '--backup-dir[make backups into specified directory]:backup directory:_directories' \
+  '--suffix=[override backup suffix]:suffix' \
+  '(-u --update)'{-u,--update}'[update only]' \
+  '(-l --links)'{-l,--links}'[copy symlinks as symlinks]' \
+  '(-L --copy-links)'{-L,--copy-links}'[treat soft links like regular files]' \
+  '--copy-unsafe-links[copy links outside the source tree]' \
+  '--safe-links[ignore links outside the destination tree]' \
+  '(-H --hard-links)'{-H,--hard-links}'[preserve hard links]' \
+  '(-p --perms)'{-p,--perms}'[preserve permissions]' \
+  '(-o --owner)'{-o,--owner}'[preserve owner]' \
+  '(-g --group)'{-g,--group}'[preserve group]' \
+  '(-D --devices)'{-D,--devices}'[preserve devices]' \
+  '(-t --times)'{-t,--times}'[preserve times]' \
+  '(-S --sparse)'{-S,--sparse}'[handle sparse files efficiently]' \
+  '(-n --dry-run)'{-n,--dry-run}'[show what would have been transferred]' \
+  '(-W --whole-file --no-whole-file)'{-W,--whole-file}'[copy whole files]' \
+  '(-W --whole-file)--no-whole-file[always use incremental rsync algorithm]' \
+  '(-x --one-file-system)'{-x,--one-file-system}'[do not cross filesystem boundaries]' \
+  '(-B --block-size)'{-B,--block-size=}'[checksum blocking size]:block size' \
+  '(-e --rsh)'{-e,--rsh}'[rsh command]:remote command:(rsh ssh)' \
+  '--rsync-path=[specify path to rsync on the remote machine]:remote command:' \
+  '(-C --cvs-exclude)'{-C,--cvs-exclude}'[autoignore files in the same way as CVS]' \
+  '--existing[only update files that already exist]' \
+  '--ignore-existing[ignore files that already exist on the receiving side]' \
+  '--delete[delete files that do not exist on the sending side]' \
+  '--delete-excluded[also delete excluded files on the receiving side]' \
+  '--delete-after[perform delete after transferring]' \
+  '--ignore-errors[delete even if there are IO errors]' \
+  '--max-delete=[do not delete more than NUM files]:number:' \
+  '(-P)--partial[keep partially transferred files]' \
+  '--force[force deletion of directories even if not empty]' \
+  '--numeric-ids[do not map uid/gid values by user/group name]' \
+  '--timeout=[set IO timeout in seconds]:seconds:' \
+  '(-I --ignore-times)'{-I,--ignore-times}'[do not exclude files that match length and time]' \
+  '--size-only[only use file size when determining if a file should be transferred]' \
+  '--modify-window=[timestamp window for file match]:seconds:' \
+  '(-T --temp-dir)'{-T,--temp-dir=}'[create temporary files in specified directory]:directory:_files -/' \
+  '--compare-dest=[also compare destination files relative to specified directory]:directory:_files -/' \
+  '(--partial --progress)-P[equivalent to --partial --progress]' \
+  '(-z --compress)'{-z,--compress}'[compress file data]' \
+  '--exclude=[exclude files matching pattern]:pattern:' \
+  '--exclude-from=[exclude patterns listed in file]:file:_files' \
+  '--include=[do not exclude files matching pattern]:pattern:' \
+  '--include-from=[do not exclude patterns listed in file]:file:_files' \
+  '--version[print version number]' \
+  '--daemon[run as a rsync daemon]' \
+  '--no-detach[do not detach from the parent]' \
+  '--address=[bind to the specified address]:address:_hosts' \
+  '--config=[specify alternate rsyncd.conf file]:file:_files' \
+  '--port=[specify alternate rsyncd port number]:port:' \
+  '--blocking-io[use blocking IO for the remote shell]' \
+  '--no-blocking-io[turn off blocking IO when it is the default]' \
+  '--stats[give some file transfer stats]' \
+  '(-P)--progress[show progress during transfer]' \
+  '--log-format=[log file transfers using specified format]:format:' \
+  '--password-file=[get password from file]:file:_files' \
+  '--bwlimit=[limit bandwidth]:kbytes per second:' \
+  '--read-batch=[read batch file]:ext:' \
+  '--write-batch[write batch file]' \
+  '(-)'{-h,--help}'[display help information]' \
+  '-4[prefer IPv4]' \
+  '-6[prefer IPv6]' \
+     -- '*=COMMAND*:command:_command' \
+	'*=FILE*:file:_files' \
+	'*=DIR*:directory:_files -/'
diff --git a/Completion/Unix/Command/_slrn b/Completion/Unix/Command/_slrn
index a063e227c..299b2a743 100644
--- a/Completion/Unix/Command/_slrn
+++ b/Completion/Unix/Command/_slrn
@@ -1,16 +1,25 @@
 #compdef slrn
 
 _arguments \
-    '-n[do not check for new groups]' \
-    '-h[NNTP host]:NNTP host:_hosts' \
-    '-p[NNTP port]:NNTP port:_ports' \
-    '-f[name of the newsrc file to use]:the newsrc file to use:_files' \
-    '-C[use colors]' \
-    '-create[create a newsrc file by getting list of groups from server]' \
-    '-d[get new text descriptions of each group from server]' \
-    '-i[name of initialization file to use]:initialization file to use:_files' \
-    '-D-[add predefined preprocessing token]' \
-    '-k[do not process score file]' \
-    '-k0[process score file but inhibit expensive scores]' \
-    '-a[use active file for getting new news]' \
-    '-m[force XTerm mouse reporting]'
+  '-n[do not check for new groups]' \
+  '-h[NNTP host]:NNTP host:_hosts' \
+  '-p[NNTP port]:NNTP port:_ports' \
+  '-f[name of the newsrc file to use]:newsrc file:_files' \
+  '(-C\-)-C[use colors]' \
+  "(-C)-C\-[don't use colors]" \
+  '-d[get new text descriptions of each group from server]' \
+  '-i[specify initialization file to use]:config file:_files' \
+  '-D-[add predefined preprocessing token]' \
+  '-k[do not process score file]' \
+  '-k0[process score file but inhibit expensive scores]' \
+  '-a[use active file for getting new news]' \
+  '-m[force XTerm mouse reporting]' \
+  '-w[wait for a key before switching to full screen mode]' \
+  '--create[create a newsrc file by getting list of groups from server]' \
+  '--debug[write debugging output to specified file]:debug file:_files' \
+  '(-)--help[show help information]' \
+  '--inews[use an external inews program to post articles]' \
+  '--kill-log[keep a log of articles  killed by the scorefile]:log file:_files' \
+  '--nntp[use builtin NNTP support]' \
+  '--pull[spool outgoing articles locally]' \
+  '--spool[read directly from spool]' \
diff --git a/Completion/Unix/Command/_user_admin b/Completion/Unix/Command/_user_admin
index f56b20d37..4e7c1d487 100644
--- a/Completion/Unix/Command/_user_admin
+++ b/Completion/Unix/Command/_user_admin
@@ -7,7 +7,7 @@ redhat=$?
 
 if [[ $service = user* ]]; then
   if [[ -r /etc/shells ]]; then
-    shells=( $(</etc/shells) )
+    shells=( ${${(f)"$(</etc/shells)"}:#\#*} )
   else
     shells=( ${(M)commands:#*/(|[abckz]|tc|ba)sh} )
   fi
@@ -24,7 +24,7 @@ if [[ $service = user* ]]; then
     '(-D)-u[uid]:uid'
     '(-D)-o[allow non unique uid]'
   )
-  [[ $OSTYPE = linux* ]] && args=( $args[@] 
+  [[ $OSTYPE = linux* ]] && args=( $args[@]
       '(-D -U -L)-p+[specify encrypted password]:encrypted password' )
 
   if [[ $service = useradd ]]; then
@@ -58,7 +58,7 @@ else
       '-f[force]'
     )
   else
-    args=( $args[@] 
+    args=( $args[@]
       '-n[specify new group name]:new group name'
       ':group name:_groups'
     )
diff --git a/Completion/Unix/Command/_vorbis b/Completion/Unix/Command/_vorbis
index 8dd078b0d..93122b91c 100644
--- a/Completion/Unix/Command/_vorbis
+++ b/Completion/Unix/Command/_vorbis
@@ -1,99 +1,91 @@
-#compdef oggenc ogg123 ogginfo oggdec 
+#compdef oggenc ogg123 ogginfo oggdec
 
-_advanced_option() {
-    _values "options name" \
-        'bitrate_average_window[set  the  managed bitrate window to NN seconds.]:number:'\
-        'lowpass_frequency[set the lowpass frequency to NN kHz.]:number:'
-}
-_vorbis (){
-    local expl
-    case $service in
-    oggenc)
-        _arguments -C -s \
-    {'(--help)-h','(-h)--help'}'[show help]'\
-    {'(--raw)-r','(-r)--raw'}'[assume input data is raw little-endian audio data with no header information.]'\
-    {'(--raw-bits=)-B','(-B)--raw-bits='}'[sets raw mode input sample size in bits.]:sample size:(8 16)'\
-    {'(--raw-chan=)-C','(-C)--raw-chan='}'[sets raw mode input number of channels.]:number of channels:'\
-    {'(--raw-rate=)-R','(-R)--raw-rate='}'[sets raw mode input samplerate.]:samplerate:(44100 48000)'\
-    '--raw-endianness[sets raw mode endianness]:endianness:(( 0\:big\ endian 1\:little\ endian ))'\
-    {'(--quiet)-Q','(-Q)--quiet'}'[quiet mode.]'\
-    {'(--bitrate=)-b','(-b)--bitrate='}'[sets encoding to the bitrate closest to n (in kb/s).]:bitrate in kb/s:'\
-    {'(--min-bitrate=)-m','(-m)--min-bitrate='}'[sets minimum bitrate to n (in kb/s).]:bitrate in kb/s:'\
-    {'(--max-bitrate=)-M','(-M)--max-bitrate='}'[sets maximum bitrate to n (in kb/s).]:bitrate in kb/s:'\
-    '--managed[turn  off  the  normal  VBR encoding]'\
-    {'(--quality=)-q','(-q)--quality='}'[sets encoding quality.]:quality:(0 1 2 3 4 5 6 7 8 9 10)'\
-    '--resample[resample input to the given sample rate (in Hz) before encoding.]:sample rate:'\
-    '--downmix[downmix input from stereo to mono.]'\
-    '--advanced-encode-option[sets  an  advanced  option.]:option name:_advanced_option'\
-    {'(--serial)-s','(-s)--serial'}'[forces a specific serial number in the output  stream.]'\
-    {'(--output-file=)-o','(-o)--output-file='}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles'\
-    {'(--pattern=)-n','(-n)--pattern='}'[produce filenames as this string]:string:'\
-    {'*-c','*--comment'}'[add the string comment as an extra comment.]:comment:'\
-    {'*-a','*--artist'}'[set the artist comment field in the comments to artist.]:artist:'\
-    {'*-G','*--genre'}'[set the genre comment field in the comments to genre.]:genre:'\
-    {'*-d','*--date'}'[sets the date comment field to the given value.]:date:'\
-    {'*-N','*--tracknum'}'[sets the track number comment field to the given value.]:track number:'\
-    {'*-t','*--title'}'[set the track title comment field to title.]:title:'\
-    {'*-l','*--album'}'[set the album comment field to album.]'\
-    '*:files:->wavfiles' && return 0
-        ;;
-    ogg123)
-        _arguments -C -s \
-        {'(-h)--help','(--help)-h'}'[show help]'\
-        {'(--version)-V','(-V)--version'}'[display version information.]'\
-        {'(-d)--device','(--device)-d'}'[output device.]:device:((null\:"discards all data" oss\:"Open Sound System" sun\:"Sun Audio" alsa\:"Advanced Linux Sound Architecture" irix\:"IRIX audio" arts\:"aRts Sound Daemon" esd\:"Enlightened Sound Daemon" au\:"Sun audio file" raw\:"Raw sample" wav\:"WAV file"))' \
-        {'(--files=)-f','(-f)--files='}'[output filename for a previously specified file device.]:output filename:_files'\
-        {'(--skip)-k','(-k)--skip'}'[skip the first '\''n'\'' seconds.]:seconds:'\
-        {'(--buffer)-b','(-b)--buffer'}'[size of input buffer.]:kilobytes:'\
-        {'(--prebuffer)-p','(-p)--prebuffer'}'[prebuffer percentage.]:percent:'\
-        {'(--quiet -q)*-v','(--quiet -q)*--verbose'}'[increase verbosity.]'\
-        {'(--verbose -v --quiet)-q','(-q --verbose -v)--quiet'}'[quiet mode.]'\
-        {'(--nth)-x','(-x)--nth'}'[block decode intervall.]:number:'\
-        {'(--ntimes)-y','(-y)--ntimes'}'[block repeat count.]:number:'\
-        {'(--shuffle)-z','(-z)--shuffle'}'[shuffle play.]'\
-        {'(--delay=)-l','(-l)--delay='}'[set delay in millisecond.]:milliseconds:'\
-        {'(--playlist)-@','(-@)--playlist'}'[Play all of  the  files from a playlist.]:playlist:_files'\
-        '--audio-buffer[size of output audio buffer.]:kilobytes:'\
-        {'*-o','*--device-option='}'[assign device option values]:devopts:->devopts'\
-        '*:files:->oggfiles' && return 0
-        ;;
-    ogginfo)
-        _arguments -C -s \
-        '-h[show a help and usage message]'\
-        '*-q[quiet  mode.]'\
-        '-v[verbose mode.]'\
-        '*:files:->oggfiles' && return 0
-        ;;
-    oggdec)
-        _arguments -C -s \
-        {'(--quiet)-q','(-q)--quiet'}'[quiet mode.]'\
-        {'(--help)-h','(-h)--help'}'[print help message.]'\
-        {'(--version)-v','(-v)--version'}'[display version information.]'\
-        {'(--bits=)-b','(-b)--bits='}'[bits per sample.]:bits per sample:(8 16)'\
-        {'(--endian=)-e','(-e)--endian'}'[set endianness for 16-bit output.]:endianness:(( 0\:\(default\)\ is\ little-endian\ \(Intel\ byte\ order\). 1\:is\ big-endian\ \(sane\ byte\ order\). ))'\
-        {'(--raw=)-R','(-R)--raw='}'[output  in  raw format.]'\
-        {'(--output=)-o','(-o)--output='}'[write output to specified filename.]:output filename:_files'\
-	    {'(--sign=)-s','(-s)--sign='}'[set signedness for output.]:signedness:(( 0\:unsigned 1\:signed\ \(default\) ))'\
-        '*:files:->oggfiles' && return 0
-        ;;
-    esac
+local expl ret=1
 
-    case $state in
-    oggfiles)
-    _description files expl 'ogg vorbis files'
-    _files "$expl[@]" -g '*.ogg'
-    ;;
-    wavfiles)
-    _description files expl 'wav files'
-    _files "$expl[@]" -g '*.wav'
-    ;;
-    devopts)
-    _setup devopts
-    _tags devopts
-    _description devopts expl 'device options'
-    compadd "$expl[@]" -S : - dsp dev card buf_size host byteorder
-    ;;
-    esac
-}
+case $service in
+  oggenc)
+    _arguments -s \
+      '(-)'{-h,--help}'[show help]' \
+      '(-r --raw)'{-r,--raw}'[assume input data is raw little-endian audio data with no header information]' \
+      '(-B --raw-bits)'{-B,--raw-bits=}'[set raw mode input sample size in bits]:sample size:(8 16)' \
+      '(-C --raw-chan)'{-C,--raw-chan=}'[set raw mode input number of channels]:number of channels' \
+      '(-R --raw-rate)'{-R,--raw-rate=}'[set raw mode input sample rate]:sample rate:(44100 48000)' \
+      '--raw-endianness[set raw mode endianness]:endianness:((0\:big\ endian 1\:little\ endian))' \
+      '(-Q --quiet)'{-Q,--quiet}'[quiet mode]' \
+      '(-b --bitrate)'{-b,--bitrate=}'[set encoding to the bitrate closest to that specified]:bitrate (kb/s)' \
+      '(-m --min-bitrate)'{-m,--min-bitrate=}'[set minimum bitrate]:bitrate (kb/s)' \
+      '(-M --max-bitrate)'{-M,--max-bitrate=}'[set maximum bitrate]:bitrate (kb/s)' \
+      '--managed[turn off the normal VBR encoding]' \
+      '(-q --quality)'{-q,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \
+      '--resample[resample input to the given sample rate before encoding]:sample rate (Hz)' \
+      '--downmix[down mix input from stereo to mono]' \
+      '--advanced-encode-option:option name:_values option "bitrate_average_window[set the managed bitrate window]\:number (seconds)" "lowpass_frequency[set the lowpass frequency]\:frequency (kHz)"' \
+      '(-s --serial)'{-s,--serial}'[force a specific serial number in the output stream]' \
+      '(-o --output-file)'{-o,--output-file=}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles' \
+      '(-n --pattern)'{-n,--pattern=}'[specify pattern for producing filenames]:string' \
+      '(-c --comment)'{-c,--comment}'[add the string comment as an extra comment]:comment' \
+      '(-a --artist)'{-a,--artist}'[set the artist comment field in the comments to artist]:artist' \
+      '(-G --genre)'{-G,--genre}'[set the genre comment field in the comments to genre]:genre' \
+      '(-d --date)'{-d,--date}'[set the date comment field to the given value]:date' \
+      '(-N --tracknum)'{-N,--tracknum}'[set the track number comment field to the given value]:track number' \
+      '(-t --title)'{-t,--title}'[set the track title comment field to title]:title' \
+      '(-l --album)'{-l,--album}'[set the album comment field to album]' \
+      '*:wav file:_files -g "(#i)*.wav"' && ret=0
+  ;;
+  ogg123)
+    _arguments -C -s \
+      '(-h --help)'{-h,--help}'[show help]' \
+      '(-)'{-V,--version}'[display version information]' \
+      '(-d --device)'{-d,--device}'[output device]:device:((null\:discard\ all\ data oss\:open\ sound\ system sun\:sun\ audio alsa\:advanced\ linux\ sound\ architecture irix\:IRIX\ audio arts\:aRts\ sound\ daemon esd\:enlightened\ sound\ daemon au\:sun\ audio\ file raw\:raw\ sample wav\:wav\ file))' \
+      '(-f --files)'{-f,--files=}'[output filename for a previously specified file device]:output filename:_files' \
+      '(-k --skip)'{-k,--skip}'[skip the first '\''n'\'' seconds]:seconds' \
+      '(-b --buffer)'{-b,--buffer}'[size of input buffer]:kilobytes' \
+      '(-p --prebuffer)'{-p,--prebuffer}'[prebuffer percentage]:percent' \
+      '(-q --quiet)'{*-v,*--verbose}'[increase verbosity]' \
+      '(-q --quiet -v --verbose)'{--quiet,-q}'[quiet mode]' \
+      '(-x --nth)'{-x,--nth}'[block decode intervall]:number' \
+      '(-y --ntimes)'{-y,--ntimes}'[block repeat count]:number' \
+      '(-z --shuffle)'{-z,--shuffle}'[shuffle play]' \
+      '(-l --delay)'{-l,--delay=}'[set delay]:delay (ms)' \
+      '(-@ --playlist)'{-@,--playlist}'[play all of  the  files from a playlist]:playlist:_files' \
+      '--audio-buffer[size of output audio buffer]:kilobytes' \
+      {'*-o','*--device-option='}'[assign device option values]:device option:->devopts' \
+      '*:files:->oggfiles' && ret=0
+  ;;
+  ogginfo)
+    _arguments -C -s \
+      '-h[show a help and usage message]' \
+      '*-q[quiet  mode]' \
+      '-v[verbose mode]' \
+      '*:files:->oggfiles' && ret=0
+  ;;
+  oggdec)
+    _arguments -C -s \
+      '(-q --quiet)'{-q,--quiet}'[quiet mode]' \
+      '(-)'{-h,--help}'[print help information]' \
+      '(-)'{-v,--version}'[display version information]' \
+      '(-b --bits)'{-b,--bits=}'[bits per sample]:bits per sample:(8 16)' \
+      '(-e --endian)'{-e,--endian=}'[set endianness for 16-bit output]:endianness:((0\:\(default\)\ little-endian\ \(Intel\ byte\ order\) 1\:big-endian\ \(sane\ byte\ order\)))' \
+      '(-R --raw)'{-R,--raw=}'[output in raw format]' \
+      '(-o --output)'{-o,--output=}'[write output to specified filename]:output filename:_files' \
+      '(-s --sign)'{-s,--sign=}'[set signedness for output]:signedness:((0\:unsigned 1\:signed\ \(default\)))' \
+      '*:files:->oggfiles' && ret=0
+  ;;
+esac
 
-_vorbis "$@"
+case $state in
+  oggfiles)
+    _wanted files expl 'ogg vorbis file' \
+	_files "$expl[@]" -g '(#i)*.ogg' && return
+  ;;
+  devopts)
+    if compset -p '*:'; then
+      _message -e value value
+    else
+      _wanted devopts expl 'device option' \
+	  compadd -S : - dsp dev card buf_size host byteorder && return
+    fi
+  ;;
+esac
+
+return ret