summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-08-28 23:16:54 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-08-29 17:32:10 +0200
commit245503929e0369e985e694684b557aef6d1432eb (patch)
tree56a50e092bf96d19d0d599615d7ce404a1d44aa7 /Completion/Unix
parentfcb4f7956799c1e0803c0cb37ee3d17c230d7dcc (diff)
downloadzsh-245503929e0369e985e694684b557aef6d1432eb.tar.gz
zsh-245503929e0369e985e694684b557aef6d1432eb.tar.xz
zsh-245503929e0369e985e694684b557aef6d1432eb.zip
43346: various completion option updates
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_attr1
-rw-r--r--Completion/Unix/Command/_cmp1
-rw-r--r--Completion/Unix/Command/_dhclient1
-rw-r--r--Completion/Unix/Command/_dig1
-rw-r--r--Completion/Unix/Command/_entr1
-rw-r--r--Completion/Unix/Command/_env9
-rw-r--r--Completion/Unix/Command/_gnutls16
-rw-r--r--Completion/Unix/Command/_iostat2
-rw-r--r--Completion/Unix/Command/_ln10
-rw-r--r--Completion/Unix/Command/_md5sum8
-rw-r--r--Completion/Unix/Command/_ps9
-rw-r--r--Completion/Unix/Command/_route6
-rw-r--r--Completion/Unix/Command/_service20
-rw-r--r--Completion/Unix/Command/_sort6
-rw-r--r--Completion/Unix/Command/_split6
-rw-r--r--Completion/Unix/Command/_top3
16 files changed, 61 insertions, 39 deletions
diff --git a/Completion/Unix/Command/_attr b/Completion/Unix/Command/_attr
index 2030064dc..d8d4ed260 100644
--- a/Completion/Unix/Command/_attr
+++ b/Completion/Unix/Command/_attr
@@ -39,6 +39,7 @@ case $service in
       '(-v --value)'{-v+,--value=}'[specify value for the attribute]' \
       '(-x --remove)'{-x+,--remove=}'[remove specified extended attribute]' \
       '(-n --name -v --value)--restore[restore extended attributes from dump file]:dump file:_files' \
+      '--raw[attribute value is not encoded]' \
       '(-h --no-dereference)'{-h,--no-dereference}"[don't follow symbolic links]" \
       '(* -)--version[display version information]' \
       '(* -)--help[display help information]' \
diff --git a/Completion/Unix/Command/_cmp b/Completion/Unix/Command/_cmp
index bcede8b0b..6d7bfb1b7 100644
--- a/Completion/Unix/Command/_cmp
+++ b/Completion/Unix/Command/_cmp
@@ -15,6 +15,7 @@ case $variant in
       '(- *)--help[display help information]'
     )
   ;;
+  netbsd*) args+=( "-c[don't use mmap]" ) ;|
   freebsd*|openbsd*)
     args=(
       "-h[don't follow symbolic links]"
diff --git a/Completion/Unix/Command/_dhclient b/Completion/Unix/Command/_dhclient
index 57a5061c2..beaab5e2d 100644
--- a/Completion/Unix/Command/_dhclient
+++ b/Completion/Unix/Command/_dhclient
@@ -54,6 +54,7 @@ case $OSTYPE in
       '(--no-pid)-pf[pid file]:pid file:_files'
       '(-pf)--no-pid[disable writing pid files]'
       '-cf[config file]:config file:_files'
+      '-df[duid file]:duid file:_files'
       '-sf[script file]:script file:_files'
       '-4o6[DHCPv4  over DHCPv6 protocol]:port'
       "-nc[don't drop capabilities]"
diff --git a/Completion/Unix/Command/_dig b/Completion/Unix/Command/_dig
index 5feb71fef..18e9a0dbd 100644
--- a/Completion/Unix/Command/_dig
+++ b/Completion/Unix/Command/_dig
@@ -26,6 +26,7 @@ local -a alts args
   '*+noedns[clear EDNS options to be sent]'
   '*+'{no,}'expire[send an EDNS Expire option]'
   '*+'{no,}'header-only[send query without a question section]'
+  '*+'{no,}'idnin[set processing of IDN domain names on input]'
   '*+'{no,}'idnout[set conversion of IDN puny code on output]'
   '*+'{no,}'keepopen[keep TCP socket open between queries]'
   '*+'{no,}'mapped[allow mapped IPv4 over IPv6 to be used]'
diff --git a/Completion/Unix/Command/_entr b/Completion/Unix/Command/_entr
index a8d43fc5e..e1ba7cf2b 100644
--- a/Completion/Unix/Command/_entr
+++ b/Completion/Unix/Command/_entr
@@ -6,6 +6,7 @@ typeset -A opt_args
 _arguments -s -S \
   '-c[execute clear before invoking utility]' \
   '-d[track directories and exit if a new file is added]' \
+  "-n[non-interactive mode; don't access TTY]" \
   '-p[postpone first execution of the utility]' \
   '-r[reload a persistent child process]' \
   '(*)-s[evaluate the first argument using interpreter specified by $SHELL]' \
diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
index 96e96bd7b..99fc513d7 100644
--- a/Completion/Unix/Command/_env
+++ b/Completion/Unix/Command/_env
@@ -1,16 +1,19 @@
 #compdef env genv
 
-local context state line variant args ret=1
+local context state line variant args ign ret=1
 
 _pick_variant -r variant gnu=Free\ Soft $OSTYPE --version
 case $variant in
   gnu)
+    (( $#words > 2 )) && ign='!'
     args=(
       '(-)'{-i,--ignore-environment}'[start with empty environment]'
       '(--ignore-environment -i --help --version)*'{-u+,--unset=}'[remove variable from the environment]:env var to remove:_parameters -g "*export*"'
       '(-C --chdir)'{-C+,--chdir=}'[change working directory]:directory:_directories'
-      '(- *)--help[display help information]'
-      '(- *)--version[display version information]'
+      '(-S --split-string)'{-S+,--split-string=}'[perform word splitting]:string to split'
+      '(-v --debug)'{-v,--debug}'[print verbose information for each processing step]'
+      "${ign}(- *)--help[display help information]"
+      "${ign}(- *)--version[display version information]"
     )
   ;;
   freebsd*)
diff --git a/Completion/Unix/Command/_gnutls b/Completion/Unix/Command/_gnutls
index 2cd559843..1c14de791 100644
--- a/Completion/Unix/Command/_gnutls
+++ b/Completion/Unix/Command/_gnutls
@@ -54,13 +54,14 @@ case "$service" in
   gnutls-cli)
     args+=(
       '--tofu[enable trust on first use authentication]' '!--no-tofu'
-      '--strict-tofu[fail to connect if a known certificate has changed]' '!--no-strict-tofu'
+      '--strict-tofu[fail to connect if a certificate is unknown or has changed]' '!--no-strict-tofu'
       '--dane[enable DANE certificate verification (DNSSEC)]' '!--no-dane'
       '--local-dns[use the local DNS server for DNSSEC resolving]' '!--no-local-dna'
       '--no-ca-verification[disable CA certificate verification]' '!--ca-verification'
       '--ocsp[enable OCSP certificate verification]' '!--no-oscp'
       '(-r --resume)'{-r,--resume}'[establish a session and resume]'
       '(-e --rehandshake)'{-e,--rehandshake}'[connect, establish a session and rehandshake immediately]'
+      "--verify-hostname-str=[specify server's hostname to use for validation]:hostname"
       '(-s --starttls)'{-s,--starttls}'[start TLS on EOF or SIGALRM]'
       '--crlf[send CR LF instead of LF]'
       '--fastopen[enable TCP Fast Open]'
@@ -75,7 +76,6 @@ case "$service" in
       '--pskusername[specify PSK username to use]:username'
       '--pskkey[specify PSK key to use]:key'
       "--insecure[don't require server cert validation]"
-      '--ranges[use length-hiding padding to prevent traffic analysis]'
       '--benchmark-ciphers[benchmark individual ciphers]'
       '--benchmark-soft-ciphers[benchmark individual software ciphers]'
       '--benchmark-tls-kx[benchmark TLS key exchange methods]'
@@ -84,7 +84,8 @@ case "$service" in
       '*--alpn=[enable application layer protocol]:string'
       '--recordsize=[specify maximum record size to advertize]:record size'
       "--disable-sni[don't send a Server Name]"
-      '--disable-extensions[disable all the TLS extensions]'
+      '--single-key-share[send a single key share under TLS1.3]'
+      '--post-handshake-auth[enable post-handshake authentication under TLS1.3]'
       '--inline-commands[inline commands of the form ^<cmd>^]'
       '--inline-commands-prefix=[change delimiter used for inline commands]:delimiter [^]'
       '--fips140-mode[report status of FIPS140-2 mode in gnutls library]'
@@ -96,20 +97,22 @@ case "$service" in
       '--sni-hostname-fatal[send fatal alert on sni-hostname mismatch]'
       '*--alpn=[specify ALPN protocol to be enabled by the server]:protocol'
       '--alpn-fatal[send fatal alert on non-matching ALPN name]'
+      "--nocookie[don't require cookie on DTLS sessions]"
       '(-g --generate)'{-g,--generate}'[generate Diffie-Hellman parameters]'
       '(-q --quiet)'{-q,--quiet}'[suppress some messages]'
       "--nodb[don't use a resumption database]"
       '--http[act as an HTTP server]'
       '--echo[act as an Echo server]'
-      '(-a --disable-client-cert)'{-a,--disable-client-cert}"[don't request a client certificate]"
-      '(-r --require-client-cert)'{-r,--require-client-cert}'[require a client certificate]'
+      '(-a --disable-client-cert -r --require-client-cert)'{-a,--disable-client-cert}"[don't request a client certificate]"
+      '(-a --disable-client-cert -r --require-client-cert)'{-r,--require-client-cert}'[require a client certificate]'
       '--verify-client-cert[if a client certificate is sent then verify it]'
       '--dhparams=[specify DH params file to use]:file:_files'
       '--srppasswd=[specify SRP password file to use]:file:_files'
       '--srppasswdconf=[specify SRP password configuration file to use]:file:_files'
       '--pskpasswd=[specify PSK password file to use]:file:_files'
       '--pskhint=[specify PSK identity hint to use]:string'
-      '--ocsp-response=[specify OCSP response to send to client]:file:_files'
+      '*--ocsp-response=[specify OCSP response to send to client]:string:_files'
+      '--ignore-ocsp-response-errors[ignore any errors when setting the OCSP response]'
     )
   ;;
 
@@ -158,7 +161,6 @@ case "$service" in
       '--empty-password[enforce an empty password]'
       '--key-type=[specify the key type to use on key generation]:key type'
       '(-i --certificate-info)'{-i,--certificate-info}'[print information on a certificate]'
-      '--certificate-pubkey[print certificate public key]'
       '(-l --crl-info)'{-l,--crl-info}'[print information on a CRL]'
       '--crq-info[print information on a certificate request]'
       "--no-crq-extensions[don't use extensions in certificate requests]"
diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_iostat
index e95d62f80..8909ae311 100644
--- a/Completion/Unix/Command/_iostat
+++ b/Completion/Unix/Command/_iostat
@@ -38,6 +38,7 @@ case $OSTYPE:l in
     args+=(
       '-D[display alternate disk statistics]'
       '-x[show extended disk statistics]'
+      '-y[report data on waiting and active requests]'
       '*:drives:( $(sysctl -n hw.disknames) )'
     )
     ;;
@@ -114,6 +115,7 @@ case $OSTYPE:l in
     args=(
       '-c[display CPU utilization report]'
       '-d[display device utilization report]'
+      '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)'
       '*-g[display statistics for a group of devices]:group name'
       '-H[only display global statistics for group]'
       '(--human)-h[human readable device utilization report]'
diff --git a/Completion/Unix/Command/_ln b/Completion/Unix/Command/_ln
index 764dc8f99..3c1dcac76 100644
--- a/Completion/Unix/Command/_ln
+++ b/Completion/Unix/Command/_ln
@@ -52,16 +52,12 @@ else
     ;|
     darwin*|dragonfly*|freebsd*|netbsd*)
       args+=(
-      '(-f)-i[prompt before removing destination files]'
-        '-v[print name of each linked file]'
-      )
-    ;|
-    darwin*|dragonfly*|freebsd*)
-      args+=(
         '-F[remove existing destination directories]'
+        '(-f)-i[prompt before removing destination files]'
+        '-v[print name of each linked file]'
       )
     ;|
-    dragonfly*|freebsd*|openbsd*)
+    dragonfly*|freebsd*|netbsd*|openbsd*)
       args+=(
         '(-L)-P[create hard links directly to symbolic links]'
         '(-P)-L[create hard links to symbolic link references]'
diff --git a/Completion/Unix/Command/_md5sum b/Completion/Unix/Command/_md5sum
index 8e93fbbac..3dfcd6322 100644
--- a/Completion/Unix/Command/_md5sum
+++ b/Completion/Unix/Command/_md5sum
@@ -7,7 +7,7 @@
 #
 # @todo Support BusyBox?
 
-local type
+local type ign
 local -a args
 
 case $service in
@@ -17,16 +17,18 @@ case $service in
 esac
 
 # General options
-args+=(
+(( $#words > 2 )) && ign='!'
+args=(
   '(: -)--help[display help information]'
   '(: -)--version[display version information]'
 )
 # Summing options
-args+=(
+args=( ${ign}${^args}
   + sum
   '(chk)--tag[create BSD-style checksums]'
   '(chk -b -t --binary --text)'{-b,--binary}'[read in binary mode]'
   '(chk -b -t --binary --text)'{-t,--text}'[read in text mode]'
+  '(chk -z --zero)'{-z,--zero}'[end each output line with NUL and disable filename escaping]'
 )
 # This is the only option that differs amongst all of these tools
 [[ $service == *b2* ]] && args+=(
diff --git a/Completion/Unix/Command/_ps b/Completion/Unix/Command/_ps
index 72e711227..98dcd1cd0 100644
--- a/Completion/Unix/Command/_ps
+++ b/Completion/Unix/Command/_ps
@@ -110,10 +110,16 @@ case $OSTYPE in
     bsdarg+=( '*G[select processes by real group]' )
   ;|
   freebsd*|dragonfly*)
-    bsd+=( 'f[show command and environment for swapped out processes]' ) ;|
+    bsd+=( 'f[show command and environment for swapped out processes]' )
+  ;|
   netbsd*|openbsd*)
     bsdarg+=( 'W[extract swap information from specified file]' )
   ;|
+  freebsd*|netbsd*)
+    bsd+=(
+      'd[show process hierarchy]'
+    )
+  ;|
   darwin*)
     bsd+=(
       'd[select all processes except session leaders]'
@@ -140,7 +146,6 @@ case $OSTYPE in
   ;;
   freebsd*)
     bsd+=(
-      'd[show process hierarchy]'
       '*J[select processes by jail ID]'
       'Z[show mac label]'
     )
diff --git a/Completion/Unix/Command/_route b/Completion/Unix/Command/_route
index f8426874c..06cca8d99 100644
--- a/Completion/Unix/Command/_route
+++ b/Completion/Unix/Command/_route
@@ -81,7 +81,7 @@ case $OSTYPE in
       '-llinfo:validly translate proto addr to link addr'
     )
   ;|
-  (open|free)bsd*|darwin*|dragonfly*)
+  (net|open|free)bsd*|darwin*|dragonfly*)
     args+=(
       "-d[debug-only mode: don't update routing table]"
       '-t[test-only mode: /dev/null used instead of a socket]'
@@ -89,7 +89,7 @@ case $OSTYPE in
   ;|
   netbsd*|solaris*)
     args+=( '-f[remove all routes first]' )
-  ;;
+  ;|
   (netbsd|darwin|dragonfly)*)
     modifiers+=( '-proxy:make entry a link level proxy' )
   ;|
@@ -121,8 +121,10 @@ case $OSTYPE in
   netbsd*)
     subcmds+=( flushall 'remove all routes including the default gateway' )
     args+=(
+      "-L[don't show link layer entries in routing table]"
       '-S[print a space when a flag is missing to align flags]'
       '-s[suppress all output from get except for the gateway]'
+      '-T[show tags in the route display]'
     )
     modifiers+=(
       '-tag'
diff --git a/Completion/Unix/Command/_service b/Completion/Unix/Command/_service
index 50e8607bf..1216f57a8 100644
--- a/Completion/Unix/Command/_service
+++ b/Completion/Unix/Command/_service
@@ -5,24 +5,28 @@
 # _sub_command happy
 
 # we are interested in init service only
-local args ctx="${curcontext}argument-1:"
+local args actions ctx="${curcontext}argument-1:"
 zstyle -T  ":completion:${ctx}" tag-order && \
   zstyle ":completion:${ctx}" tag-order init
 
 case $OSTYPE in
+  freebsd<11->.*)
+    args=( '-j+[perform actions in specified jail]:jail:_jails' )
+  ;&
   freebsd*|dragonfly*)
-    args=(
-      '(-)-r[show the results of boot time rcorder]'
-      '(-)-R[restart all enabled local services]'
+    actions=(
+      '(*)-r[show the results of boot time rcorder]'
+      '(*)-R[restart all enabled local services]'
     )
   ;&
   netbsd*)
     _arguments -s $args \
-      '(-)-e[show services that are enabled]' \
-      '(-)-l[list all scripts in /etc/rc.d and the local startup directory]' \
       '(-e -R)-v[verbose]' \
-      ':service name:_services' \
-      '*::service argument:_init_d'
+      '*::service argument:_init_d' \
+      + '(actions)' $actions \
+      '(*)-e[show services that are enabled]' \
+      '(*)-l[list all scripts in /etc/rc.d and the local startup directory]' \
+      ':service name:_services'
   ;;
   *)
     _arguments -s \
diff --git a/Completion/Unix/Command/_sort b/Completion/Unix/Command/_sort
index c81e6f856..dfd43ce55 100644
--- a/Completion/Unix/Command/_sort
+++ b/Completion/Unix/Command/_sort
@@ -4,8 +4,8 @@ local args variant
 local ordering='(-d --dictionary-order -g --general-numeric-sort -M --month-sort -h --human-numeric-sort -n --numeric-sort --sort -V --version-sort --help --version)'
 
 args=(
-  "(-c --check -C)-c[check whether input is sorted; don't sort]"
-  '(-m --merge)'{-m,--merge}"[merge already sorted files; don't sort]"
+  "(-c --check -C -m --merge -s --stable)-c[check whether input is sorted; don't sort]"
+  '(-c --check -C -m --merge)'{-m,--merge}"[merge already sorted files; don't sort]"
   '(-o --output)'{-o+,--output=}'[write result to file instead of standard output]:output file:_files'
   \*{-T+,--temporary-directory=}'[specify directory for temporary files]:directory:_directories'
   '(-u --unique)'{-u,--unique}'[with -c, check for strict ordering; without -c, output only the first of an equal run]'
@@ -26,7 +26,7 @@ case $variant in
       '(-s --stable)'{-s,--stable}'[preserve original order of lines with the same key]'
     )
   ;|
-  openbsd*|freebsd*|gnu|solaris2.<11->)
+  netbsd*|openbsd*|freebsd*|gnu|solaris2.<11->)
     args+=(
       "(-c --check -C)-C[check whether input is sorted silently; don't sort]"
     )
diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_split
index 25b5aec2d..c5ab0dc9b 100644
--- a/Completion/Unix/Command/_split
+++ b/Completion/Unix/Command/_split
@@ -42,12 +42,12 @@ case $variant in
   (free|net)bsd*)
     args+=( '(-b -l -p)-n+[generate specified number of output files]:output files' )
   ;|
-  freebsd*)
+  darwin*|freebsd*)
     args+=(
-      '-d[use numeric suffixes]'
       '(-b -l -n)-p+[split the file whenever a line matches specified pattern]:pattern'
     )
-  ;;
+  ;|
+  freebsd*) args+=( '-d[use numeric suffixes]' ) ;;
 esac
 
 _arguments -s -S $args && ret=0
diff --git a/Completion/Unix/Command/_top b/Completion/Unix/Command/_top
index 8f81e9526..f9d2733fc 100644
--- a/Completion/Unix/Command/_top
+++ b/Completion/Unix/Command/_top
@@ -72,7 +72,8 @@ case $OSTYPE in
       '-m+[specify statistic type]:type:(( cpu\:default io ))'
       '-P[per-cpu CPU usage statistics]'
       '(1 -)-v[write version number and exit]'
-      '-z[do not display system idle process]'
+      '-w[display approximate swap usage]'
+      "-z[don't display system idle process]"
       '-J+[show processes owned by the specified jail]:jail:_jails -0'
       '-U+[show processes owned by the specified username]: :_users'
     );;