PATCH: completers: various small fixes

Mikael Magnusson <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
_find: - and + were reversed compared to the disp string
_zstyle: fix typo breaking chpwd-specific style completion
_sudo: minor typo in exclusion list
_rsync: fix some minor thinkos
_ip: fix a few typos
_sort: remove double --ignore-nonprinting line
_df: fix typo widge -> wedge
_tmux: fix various issues
_mount: defperm confusion
_sed: typo
_netstat: fix -4/-6 typo
_wget: fix some syntactical typos
_subversion: fix using wrong cache name
_lsof: typo
_ffmpeg: fix copy-pasto in for scodecs
_ansible: --skip-tags also takes tags
---
 Completion/Unix/Command/_ansible    | 2 +-
 Completion/Unix/Command/_df         | 2 +-
 Completion/Unix/Command/_ffmpeg     | 4 ++--
 Completion/Unix/Command/_find       | 2 +-
 Completion/Unix/Command/_ip         | 6 +++---
 Completion/Unix/Command/_lsof       | 2 +-
 Completion/Unix/Command/_mount      | 4 ++--
 Completion/Unix/Command/_netstat    | 2 +-
 Completion/Unix/Command/_rsync      | 8 ++++----
 Completion/Unix/Command/_sed        | 2 +-
 Completion/Unix/Command/_sort       | 1 -
 Completion/Unix/Command/_subversion | 4 ++--
 Completion/Unix/Command/_sudo       | 2 +-
 Completion/Unix/Command/_tmux       | 8 ++++----
 Completion/Unix/Command/_wget       | 4 ++--
 Completion/Zsh/Command/_zstyle      | 2 +-
 16 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible
index ab0cdee6c5..7e4f789af3 100644
--- a/Completion/Unix/Command/_ansible
+++ b/Completion/Unix/Command/_ansible
@@ -66,7 +66,7 @@ case $service in
   ansible-playbook|ansible-pull)
     args+=(
       \*{-t,--tags}'[only run plays and tasks tagged with these values]:tag:->tags'
-      "*--skip-tags[only run plays and tasks whose tags don't match]"
+      "*--skip-tags[only run plays and tasks whose tags don't match]:tag:->tags"
     )
   ;|
   ansible-playbook|ansible-console)
diff --git a/Completion/Unix/Command/_df b/Completion/Unix/Command/_df
index dae833dfab..ebfe961861 100644
--- a/Completion/Unix/Command/_df
+++ b/Completion/Unix/Command/_df
@@ -88,7 +88,7 @@ elif [[ "$OSTYPE" == (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then
         '(-P -G -N)-f[display only the available free]'
         '(-G -i -P)-G[display all fields in statvfs]'
         '(-G -P)-N[suppress the header line normally output]'
-        '-W[print widge name instead of the device]'
+        '-W[print wedge name instead of the device]'
       )
       ;;
   esac
diff --git a/Completion/Unix/Command/_ffmpeg b/Completion/Unix/Command/_ffmpeg
index e5afdac4f1..9c91fe386f 100644
--- a/Completion/Unix/Command/_ffmpeg
+++ b/Completion/Unix/Command/_ffmpeg
@@ -23,8 +23,8 @@ typeset -A opt_args
 
 (( $+functions[_ffmpeg_scodecs] )) || _ffmpeg_scodecs() {
     local scodecs
-    scodecs=(copy ${${(M)${(f)"$(_call_program video-codecs $words[1] -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]S[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
-    _wanted ffmpeg-video-codecs expl 'force video codec (''copy'' to copy stream)' compadd -a scodecs
+    scodecs=(copy ${${(M)${(f)"$(_call_program subtitle-codecs $words[1] -codecs 2>/dev/null)"}:#[[:space:]][D[:space:]][E[:space:]]S[S[:space:]][D[:space:]][T[:space:]][[:space:]][^[:space:]]##*}//(#b)????????([^[:space:]]##)*/$match[1]})
+    _wanted ffmpeg-subtitle-codecs expl 'force subtitle codec (''copy'' to copy stream)' compadd -a scodecs
 }
 
 (( $+functions[_ffmpeg_formats] )) || _ffmpeg_formats() {
diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
index 4908cabbc2..8628ad43e9 100644
--- a/Completion/Unix/Command/_find
+++ b/Completion/Unix/Command/_find
@@ -162,7 +162,7 @@ if [[ $state = times ]]; then
       zstyle -s ":completion:${curcontext}:senses" list-separator sep || sep=--
       default=" [default exactly]"
       disp=( "+ $sep before (older files)" "- $sep since (newer files)" )
-      smatch=( - + )
+      smatch=( + - )
     else
       disp=( before exactly since )
       smatch=( + '' - )
diff --git a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip
index 0dde5e5f08..59a5e3963c 100644
--- a/Completion/Unix/Command/_ip
+++ b/Completion/Unix/Command/_ip
@@ -228,7 +228,7 @@ _regex_words addr-show-commands "addr show commands" \
   'up:limit display to running devices' \
   's*cope:specify scope for address:$subcmd_scope' \
   't*o:limit to given IP address/prefix:$subcmd_ipaddr' \
-  'la*bel:list tags matching glob patter:$subcmd_string' \
+  'la*bel:list tags matching glob pattern:$subcmd_string' \
   'dynamic:list addresses from stateless configuration (IPv6)' \
   'permanent:list non-dynamic addresses (IPv6)' \
   'tentative:list addresses failing duplicate address detection (IPv6)' \
@@ -276,7 +276,7 @@ _regex_words \
   'a*dd: add an address labels:$addrlabel_add_cmds' \
   'd*el: delete an address labels:$addrlabel_del_cmds' \
   'l*ist: list address labels' \
-  'f*lush: flush adderss labels'
+  'f*lush: flush address labels'
 addrlabel_cmds=("$reply[@]")
 
 #
@@ -399,7 +399,7 @@ route_cmds=("$reply[@]")
 #
 local -a rule_add_cmds
 _regex_words rule-add-commands 'ip rule add/delete commands' \
-  'ty*xpe:type of rule:$subcmd_ruletypes' \
+  'ty*pe:type of rule:$subcmd_ruletypes' \
   'fr*om:select source prefix:$subcmd_ipaddr' \
   'to:select destination prefix:$subcmd_ipaddr' \
   'iif:select input interface (device):$subcmd_dev' \
diff --git a/Completion/Unix/Command/_lsof b/Completion/Unix/Command/_lsof
index 60f59a589b..a6dd4a03ea 100644
--- a/Completion/Unix/Command/_lsof
+++ b/Completion/Unix/Command/_lsof
@@ -119,7 +119,7 @@ case $state in
   states)
     if compset -P 1 '*:'; then
       _sequence _wanted states expl state compadd - -M 'm:{a-z}={A-Z}' \
-          CLOSED IDLE BOUND LISTEN ESTABLISHED SYN_SENT SYN_RCDV ESTABLISHED \
+          CLOSED IDLE BOUND LISTEN ESTABLISHED SYN_SENT SYN_RCVD \
           CLOSE_WAIT FIN_WAIT1 CLOSING LAST_ACK FIN_WAIT_2 TIME_WAIT && ret=0
     else
       compset -S ':*' || suf=( -qS : )
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index bf75aa1186..bdabd37917 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -293,8 +293,8 @@ if (( ! $+_fs_any )); then
       'sync[do I/O synchronously]'
     )
     _fs_cdfs=(
-      '(nodefperm)defperm[ignore permission bits]'
-      '(defperm)defperm[use permission bits]'
+      '(defperm)nodefperm[ignore permission bits]'
+      '(nodefperm)defperm[use permission bits]'
       'noversion[strip off version extension]'
       'rrip[use RRIP extensions]'
     )
diff --git a/Completion/Unix/Command/_netstat b/Completion/Unix/Command/_netstat
index 35d639f995..256337e22a 100644
--- a/Completion/Unix/Command/_netstat
+++ b/Completion/Unix/Command/_netstat
@@ -14,7 +14,7 @@ case $OSTYPE in
   linux-gnu)
     families=(
       '(-4 --inet)'{-4,--inet}
-      '(-6 --inet)'{-4,--inet6}
+      '(-6 --inet)'{-6,--inet6}
       '(-A --protocol)'{-A+,--protocol=}':protocol:_sequence compadd - inet inet6 unix ipx ax25 netrom ddp bluetooth'
       --unix -x --ip --tcpip --ax25 --x25 --rose --ash
       --bluetooth --ipx --netrom --ddp --appletalk --econet --ec
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index 1657d411e5..04d809c3a7 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -209,9 +209,9 @@ _rsync() {
     '--force-change[affect user-/system-immutable files/dirs]' \
     '--force-uchange[affect user-immutable files/dirs]' \
     '--force-schange[affect system-immutable files/dirs]' \
-    "--max-delete=[don't delete more than NUM files]: :_numbers -f -u bytes size B K M G T P" \
+    "--max-delete=[don't delete more than NUM files]:number" \
     "--max-size=[don't transfer any file larger than specified size]: :_numbers -f -u bytes size B K M G T P" \
-    '--min-size=[do not transfer any file smaller than specified size]:number' \
+    "--min-size=[don't transfer any file smaller than specified size]: :_numbers -f -u bytes size B K M G T P" \
     '--max-alloc=[set limit to individual memory allocation]: :_numbers -f -u bytes -d 1g size B K M G T P' \
     '(-P)--partial[keep partially transferred files]' \
     '--no-partial[turn off --partial]' \
@@ -278,8 +278,8 @@ _rsync() {
     '(--usermap --groupmap --chown)--chown=[simple username/groupname mapping]:user and/or group:_rsync_users_groups' \
     '*'{-M+,--remote-option=}'[send option to the remote side only]:option string' \
     '--preallocate[preallocate the full length of new files]' \
-    '--iconv=[request charset conversion of filenames]:number' \
-    '--checksum-seed=:number' \
+    '--iconv=[request charset conversion of filenames]:convert specification' \
+    '--checksum-seed=[set checksum seed (advanced)]:number' \
     '--read-batch=[read a batched update from the specified file]:file:_files'
 }
 
diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed
index ecbec61d1b..2626281555 100644
--- a/Completion/Unix/Command/_sed
+++ b/Completion/Unix/Command/_sed
@@ -88,7 +88,7 @@ elif _pick_variant -r variant gnu=GNU unix --version; then
       'v:fail if GNU extensions not supported or older than specified version'
     )
     cmds_end+=(
-      "e:execute a command and include it's output"
+      "e:execute a command and include its output"
       'F:print the filename of the current input file'
       'Q:quit'
       'z:empty the pattern space'
diff --git a/Completion/Unix/Command/_sort b/Completion/Unix/Command/_sort
index 90827de4ff..ac808a6d4d 100644
--- a/Completion/Unix/Command/_sort
+++ b/Completion/Unix/Command/_sort
@@ -45,7 +45,6 @@ case $variant in
       "$ordering"{-R,--random-sort}'[sort by random hash of keys]'
       "$ordering"{-V,--version-sort}'[sort version numbers]'
       "$ordering--sort=[specify comparator]:comparator:(general-numeric human-numeric month numeric random version)"
-      '(-i --ignore-nonprinting)'{-i,--ignore-nonprinting}'[consider only printable characters]'
       '--random-source=[get random bytes from file]:file:_files'
       '--batch-size=[maximum inputs to merge]:number'
       '--compress-program=[specify program to compress temporary files with]:program:(gzip bzip2 lzop xz)'
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index e2889c71ae..d3f800610b 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -79,7 +79,7 @@ _svn () {
 	  usage=${${(M)${(f)"$(_call_program options svn help $dash_v -- $cmd)"}:#usage:*}#usage:*$cmd] }
 	  _store_cache svn-${cmd}-usage usage
 	fi
-	if _cache_invalid svn-${cmd}-usage || \
+	if _cache_invalid svn-${cmd}-args || \
 	    ! _retrieve_cache svn-${cmd}-args;
 	then
 	  args=(
@@ -119,7 +119,7 @@ _svn () {
 	  _store_cache svn-${cmd}-args args
 	fi
 
-        case $cmd in;
+        case $cmd in
           (add)
             args+=(
               '*:file: _svn_modified "addable"'
diff --git a/Completion/Unix/Command/_sudo b/Completion/Unix/Command/_sudo
index 18da0f79e0..33a9d6c0c2 100644
--- a/Completion/Unix/Command/_sudo
+++ b/Completion/Unix/Command/_sudo
@@ -52,7 +52,7 @@ else
     '(--preserve-env -i --login -s --shell -e --edit)-E[preserve user environment when running command]' \
     '(-E -i --login -s --shell -e --edit)--preserve-env=-[preserve user environment when running command]::environment variable:_sequence _parameters -g "*export*"' \
     '(-H --set-home -i --login -s --shell -e --edit)'{-H,--set-home}"[set HOME variable to target user's home dir]" \
-    '(-P --preserve-groups -i -login -s --shell -e --edit)'{-P,--preserve-groups}"[preserve group vector instead of setting to target's]" \
+    '(-P --preserve-groups -i --login -s --shell -e --edit)'{-P,--preserve-groups}"[preserve group vector instead of setting to target's]" \
     '*:: :->normal'
   )
 fi
diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index 62b8cdf7ce..80c69d2fb3 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -567,7 +567,7 @@ _tmux-list-windows() {
   [[ -n ${tmux_describe} ]] && print "list windows of a session" && return
   _arguments -s \
     '-a[list all windows the tmux server possesses]' \
-    '-F[specify output format]:format:__tmux-formats' \
+    '-F+[specify output format]:format:__tmux-formats' \
     '-f+[filter items]:filter format:__tmux-formats' \
     '-t+[specify session]:session:__tmux-sessions'
 }
@@ -764,7 +764,7 @@ _tmux-respawn-pane() {
     '-c+[specify a new working directory for the pane]:directory:_directories' \
     '*-e[specify environment variable]:environment variable:_parameters -g "*export*" -qS=' \
     '-k[kill window if it is in use]' \
-    '-t+[specify target pane]:pane:__tmux-pane' \
+    '-t+[specify target pane]:pane:__tmux-panes' \
     ':command:_cmdambivalent'
 }
 
@@ -886,7 +886,7 @@ _tmux-server-access() {
 }
 
 _tmux-set-buffer() {
-  [[ -n ${tmux_describe} ]] && print "set contents of a paster buffer" && return
+  [[ -n ${tmux_describe} ]] && print "set contents of a paste buffer" && return
   _arguments -s -A "-*" -S \
     '-a[append to rather than overwriting target buffer]' \
     '-b+[specify target buffer index]:pane:__tmux-buffers' \
@@ -999,7 +999,7 @@ _tmux-show-hooks() {
 
 _tmux-show-buffer() {
   [[ -n ${tmux_describe} ]] && print "display the contents of a paste buffer" && return
-  _arguments '-b[specify target buffer index]:pane:->buffer'
+  _arguments '-b[specify target buffer index]:buffer:__tmux-buffers'
 }
 
 _tmux-show-environment() {
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index acc8d5c6ed..4e49193c8a 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -55,7 +55,7 @@ _arguments -C -s \
   '--prefer-family=[connect first to addresses of specified family]:address family:(IPv6 IPv4 none)' \
   '(--http-user --ftp-user)--user[set both ftp and http user]:user' \
   '(--http-password --ftp-password)--password[set both ftp and http password]:password' \
-  '(--password --http-password --ftp-password)--ask-password:[prompt for passwords]' \
+  '(--password --http-password --ftp-password)--ask-password[prompt for passwords]' \
   '--use-askpass=:command:_command_names -e' \
   '--no-iri[turn off IRI support]' \
   '--local-encoding=[specify local encoding for IRIs]:encoding' \
@@ -105,7 +105,7 @@ _arguments -C -s \
   '--certificate=[specify client certificate]:client certificate file:_files' \
   '--certificate-type=[specify client certificate type]:certificate type:(PEM DER)' \
   '--private-key=[specify private key file]:key file:_files' \
-  '--private-key-type=[specify private key type]:key type:key type:(PEM DER)' \
+  '--private-key-type=[specify private key type]:key type:(PEM DER)' \
   "--ca-certificate=[specify file with bundle of CA's]:file:_files" \
   "--ca-directory=[specify dir where hash list of CA's are stored]:directory:_directories" \
   '--crl-file=[specify file with bundle of CRLs]:file:_files' \
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index 0c81c2f2e6..9bba030c8a 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -339,7 +339,7 @@ while (( $#state )); do
 	ctop=c
 	;;
 
-	(:chwpd:*)
+	(:chpwd:*)
 	ctop=d
 	;;
 
-- 
2.38.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.