summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--Completion/Linux/Command/_cryptsetup22
-rw-r--r--Completion/Linux/Command/_networkmanager1
-rw-r--r--Completion/Linux/Command/_strace4
-rw-r--r--Completion/Linux/Command/_sysstat10
-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
21 files changed, 106 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index 863c85e71..f10606060 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2018-08-29  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+	* 43346: Completion/Linux/Command/_cryptsetup,
+	Completion/Linux/Command/_networkmanager,
+	Completion/Linux/Command/_strace, Completion/Unix/Command/_attr,
+	Completion/Linux/Command/_sysstat, Completion/Unix/Command/_cmp,
+	Completion/Unix/Command/_dhclient, Completion/Unix/Command/_dig,
+	Completion/Unix/Command/_entr, Completion/Unix/Command/_gnutls,
+	Completion/Unix/Command/_env, Completion/Unix/Command/_iostat,
+	Completion/Unix/Command/_ln, Completion/Unix/Command/_md5sum,
+	Completion/Unix/Command/_ps, Completion/Unix/Command/_route,
+	Completion/Unix/Command/_service, Completion/Unix/Command/_sort,
+	Completion/Unix/Command/_split, Completion/Unix/Command/_top:
+	various completion option updates
+
 	* 43348: Anton Shestakov: Completion/Unix/Command/_hg:
 	check for both -r and --rev
 
diff --git a/Completion/Linux/Command/_cryptsetup b/Completion/Linux/Command/_cryptsetup
index 351859586..ddb2ad3a9 100644
--- a/Completion/Linux/Command/_cryptsetup
+++ b/Completion/Linux/Command/_cryptsetup
@@ -1,8 +1,9 @@
 #compdef cryptsetup
 
-local curcontext="$curcontext" ret=1
+local curcontext="$curcontext" ign ret=1
 local -a actions state line expl
 
+(( $#words > 2 )) && ign='!'
 _arguments -s \
   '(-v --verbose)'{-v,--verbose}'[enable verbose mode]' \
   '--debug[enable debug mode]' \
@@ -65,9 +66,10 @@ _arguments -s \
   '--label=[set label for the LUKS2 device]:label' \
   '--subsystem=[set subsystem label for the LUKS2 device]:subsystem' \
   '--unbound[create unbound (no assigned data segment) LUKS2 keyslot]' \
-  '(- : *)--version[show version information]' \
-  '(- : *)'{-\?,--help}'[display help information]' \
-  '(- : *)--usage[display brief usage]' \
+  '--json-file=[read or write token to json file]:json file:_files -g "*.json(-.)"' \
+  "${ign}(- : *)--version[show version information]" \
+  "${ign}(- : *)"{-\?,--help}'[display help information]' \
+  "${ign}(- : *)--usage[display brief usage]" \
   ':action:->actions' \
   '*::arguments:->action-arguments' && ret=0
 
@@ -97,6 +99,7 @@ case $state in
       'luksResume:resume suspended LUKS device'
       'luksHeaderBackup:store binary backup of headers'
       'luksHeaderRestore:restore header backup'
+      'token:manipulate auto-activation token of the device'
     )
     _describe action actions && ret=0
   ;;
@@ -118,6 +121,17 @@ case $state in
 	args=( $device ':key file:_files' )
       ;;
       luksHeader*) args=( $device '--header-backup-file:file:_files' );;
+      token)
+	args=(
+	  ':action:((
+	    add\:create\ a\ new\ keyring
+	    remove\:remove\ any\ token\ from\ slot
+	    import\:store\ arbitrary\ valid\ token\ json\ in\ LUKS2\ header
+	    export\:write\ requested\ token\ json\ to\ a\ file
+	  ))'
+	  $device
+	)
+      ;;
       *)
         _default && ret=0
       ;;
diff --git a/Completion/Linux/Command/_networkmanager b/Completion/Linux/Command/_networkmanager
index e38215e76..fa9301971 100644
--- a/Completion/Linux/Command/_networkmanager
+++ b/Completion/Linux/Command/_networkmanager
@@ -6,6 +6,7 @@ _networkmanager() {
   local curcontext="$curcontext" state line
 
   _arguments -C \
+    '(-o -overview)-o'{,verview}'[overview mode (hide default values)]' \
     '(-p -pretty -t -terse)-t'{,erse}'[terse output]' \
     '(-p -pretty -t -terse)-p'{,retty}'[pretty output]' \
     '(-m -mode)-m'{,ode}'[output mode]:mode:(tabular multiline)' \
diff --git a/Completion/Linux/Command/_strace b/Completion/Linux/Command/_strace
index cff9a49c6..83ccc6afb 100644
--- a/Completion/Linux/Command/_strace
+++ b/Completion/Linux/Command/_strace
@@ -54,7 +54,9 @@ case $state in
       'signal[trace only the specified subset of signals]:signal:_sequence _signals -s -M "B\:!="' \
       'read[perform a full hex and ASCII dump of all the data read from listed file descriptors]:file descriptor:_sequence _file_descriptors' \
       'write[perform a full hex and ASCII dump of all the data written to listed file descriptors]:file descriptor:_sequence _file_descriptors' \
-      'fault[perform syscall fault injection]:system call:_sys_calls -a -n' && ret=0
+      'fault[perform syscall fault injection]:system call:_sys_calls -a -n' \
+      'inject[perform syscall tampering]:system call:_sys_calls -a -n' \
+      'kvm[print the exit reason of kvm vcpu]: :(vcpu)' && ret=0
     if [[ $words[CURRENT] != *=* || $state = syscalls ]]; then
       local dedup sets suf="-qS,"
       compset -P '!'
diff --git a/Completion/Linux/Command/_sysstat b/Completion/Linux/Command/_sysstat
index 8b7929ddd..e091dd3ea 100644
--- a/Completion/Linux/Command/_sysstat
+++ b/Completion/Linux/Command/_sysstat
@@ -8,6 +8,7 @@ _mpstat() {
     '(-A)-I[report interrupt statistics]:interrupt:(SUM CPU SCPU ALL)' \
     '(-A)-N[specify NUMA nodes]:NUMA node' \
     '(-A)-n[report summary CPU statistics based on NUMA node placement]' \
+    '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)' \
     '-o[display statistics in JSON]:format:(JSON)' \
     '(-A)-P[specify processor number]:processor: _values -s "," processor ALL {0..$(_call_program processors getconf _NPROCESSORS_ONLN)}' \
     '-u[report CPU utilization]' \
@@ -18,6 +19,7 @@ _mpstat() {
 
 _cifsiostat() {
   _arguments : \
+    '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)' \
     '-h[human readable]' \
     '(-m)-k[display statistics in kB/s]' \
     '(-k)-m[display statistics in MB/s]' \
@@ -49,6 +51,9 @@ _sadf() {
       '-O[specify output options]: : _values -s , option
         autoscale height\:value oneday packed showidle showinfo skipempty showhints' \
       '-P[restrict processor dependant statistics]:processor number(zero indexed) or ALL:(ALL)' \
+      '--dev=-[specify block devices for which statistics are to be displayed]:block device:_files -g "*(-%)"' \
+      '--fs=-[specify filesystems for which statistics are to be displayed]:file system:_dir_list -s ,' \
+      '--iface=-[specify network interfaces for which statistics are to be displayed]:network interface:_sequence _net_interfaces' \
       '-s[set starting time of report]:starting time (HH\:MM\:SS)"' \
       '(-t -U)-T[display timestamp in local time]' \
       '(-T -U)-t[display timestamp in file\''s original localtime]' \
@@ -81,15 +86,19 @@ _sar() {
     '-C[display comments from sadc]' \
     '-D[use saYYYYMMDD instead of saDD as the standard system activity daily data file name]' \
     '-d[report activity for each block device]' \
+    '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)' \
+    '--dev=-[specify block devices for which statistics are to be displayed]:block device:_files -g "*(-%)"' \
     '-e[set ending time of report]:ending time (HH\:MM\:SS)' \
     '-F[display statistics for mounted filesystems]' \
     '-f[extract records from file]:record:_files' \
+    '--fs=-[specify filesystems for which statistics are to be displayed]:file system:_dir_list -s ,' \
     '-H[report hugepages utilization]' \
     '(--human -p)-h[make output easier to read: implies --human and -p]' \
     '(- 1 2)--help[display usage information]' \
     '--human[print sizes in human readable format]' \
     '*-I[report statistics for interrupts]:interrupts: _values -s "," interrupts 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 SUM ALL XALL' \
     '-i[select records as close as possible to interval]:interval' \
+    '--iface=-[specify network interfaces for which statistics are to be displayed]:network interface:_sequence _net_interfaces' \
     '-j[display persistent device names]:type:(ID LABEL PATH UUID)' \
     '-m[report power management statistics]:keywords: _values -s "," keywords CPU FAN FREQ IN TEMP USB ALL' \
     '-n[report network statistics]:keywords: _values -s "," keywords DEV EDEV NFS NFSD SOCK IP EIP ICMP EICMP TCP ETCP UDP SOCK6 IP6 EIP6 ICMP6 EICMP6 UDP6 FC SOFT ALL' \
@@ -135,6 +144,7 @@ _pidstat() {
     '-v[display values from kernel table]' \
     '-w[report task switching activity]' \
     '-G[include only processes with specified name]:process name' \
+    '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)' \
     '--human[print sizes in human readable format]' \
     '1: : _guard "^-*" interval' \
     '2: : _guard "^-*" count'
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'
     );;