zsh-workers
 help / color / mirror / Atom feed
* PATCH: update completions for openbsd 6.8
@ 2021-02-07  1:33 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2021-02-07  1:33 UTC (permalink / raw)
  To: Zsh workers

Continuing with base utilities on the BSDs, this patch updates
completions for OpenBSD 6.8 (except for openssh). The changes also cover
what was new in 6.7. For netstat, the documentation was rearranged
somewhat so it was harder to tell what the differences were and I'm more
likely to have made a mistake.

Oliver

diff --git a/Completion/BSD/Command/_signify b/Completion/BSD/Command/_signify
index 6a786e2e1..91e97e811 100644
--- a/Completion/BSD/Command/_signify
+++ b/Completion/BSD/Command/_signify
@@ -5,6 +5,7 @@ _arguments -s -S -A "-*" : \
   '-C[verify a signed checksum list and the checksum for each file]' \
   '-p+[public key]:public key:_files' \
   '-q[quiet mode]' \
+  '-t+[specify key type]:key type' \
   '-x+[specify signature file]:signature file:_files' \
   '*:file:_files' \
   - generate \
diff --git a/Completion/BSD/Command/_systat b/Completion/BSD/Command/_systat
index 73533e864..a123e081c 100644
--- a/Completion/BSD/Command/_systat
+++ b/Completion/BSD/Command/_systat
@@ -45,6 +45,7 @@ case $OSTYPE in
       '-B[raw, non-interactive mode (two screen updates)]'
       '-b[raw, non-interactive mode (one screen update)]'
       '-d[exit after `count'\'' updates]:count'
+      '-h[human readable output]'
       '-i[interactive mode]'
       '-N[resolve network addresses to names]'
       '-n[do not resolve network addresses to names]'
diff --git a/Completion/Unix/Command/_locale b/Completion/Unix/Command/_locale
index a7fd88f65..f1ed4bf36 100644
--- a/Completion/Unix/Command/_locale
+++ b/Completion/Unix/Command/_locale
@@ -28,6 +28,7 @@ elif [[ $OSTYPE == openbsd* ]]; then
   specs=(
     '(-m)-a[list all available locales]'
     '(-a)-m[list all available charmaps]'
+    '1:name:(charmap)'
   )
 
 else
diff --git a/Completion/Unix/Command/_netstat b/Completion/Unix/Command/_netstat
index 94aa1688d..84d5dc2f2 100644
--- a/Completion/Unix/Command/_netstat
+++ b/Completion/Unix/Command/_netstat
@@ -5,10 +5,10 @@ local lopt='[show only listening sockets]'
 local zopt='-z[reset statistic counters after displaying them]'
 local popt='(-f)-p+[filter by protocol]:protocol:compadd -a plist'
 local Iopt='(-i)-I+[show information about the specified interface]:interface:_net_interfaces'
-local set sel
+local set sel tblopt
 local -A sets
 local -a Mopts families flist plist args sockets extend interval verbose
-local -a {sel_,}{bpf,dhcp,groups,interfaces,masquerade,media,memory,multicast,pcb,queues,routing,statistics,wireless}
+local -a {sel_,}{bpf,dhcp,groups,interfaces,masquerade,media,memory,multicast,pcb,queues,rdomains,routing,statistics,wireless}
 
 case $OSTYPE in
   linux-gnu)
@@ -130,7 +130,7 @@ case $OSTYPE in
     )
     routing=( $families )
     sel_memory=( '-m[display statistics recorded by the memory management routines]' )
-    sel_interfaces+=( '(1 -a -f -i -p -s)-w+[display packet traffic at intervals]:interval (seconds)' )
+    sel_interfaces+=( '(1 -a -f -i -p -s -u)-w+[display packet traffic at intervals]:interval (seconds)' )
   ;|
   darwin*|dragonfly*|(net|free)bsd*)
     interfaces+=( '-a[show multicast addresses currently in use]' )
@@ -266,13 +266,15 @@ case $OSTYPE in
     )
   ;;
   openbsd*)
-    sets+=( wireless '-W*' )
+    sets+=( wireless '-W*' rdomains '-R' )
+    sel_rdomains=( '-R[show all rdomains with associated interfaces and routing tables]' )
     sel_wireless=( '-W+[display per-interface IEEE 802.11 wireless statistics]:interface' )
     flist+=( local mpls )
-    sockets+=( -l$lopt '-B[show buffer sizes for TCP sockets]' )
-    routing+=(
+    tblopt='-T+[select an alternate routing table to query]:routing table'
+    sockets+=( -l$lopt $tblopt '-B[show buffer sizes for TCP sockets]' )
+    routing+=( $Mopts $tblopt
+      '-A[show the internal addresses of the routing table]'
       '-F[only show routes with gateway in the same address family as the destination]'
-      '-T+[select an alternate routing table to query]:routing table'
     )
     interfaces+=(
       '-c+[show specified number of updates, then exit]:count'
@@ -280,7 +282,8 @@ case $OSTYPE in
       '-q[only show interfaces that have seen packets]'
       '-t[show current value of the watchdog timer function]'
     )
-    statistics+=( $popt )
+    statistics+=( $popt '-r[display routing statistics]' )
+    groups+=( -n$nopt )
     pcb+=( $Mopts $verbose )
   ;;
   netbsd*)
diff --git a/Completion/Unix/Command/_top b/Completion/Unix/Command/_top
index 652432166..af3deb6c7 100644
--- a/Completion/Unix/Command/_top
+++ b/Completion/Unix/Command/_top
@@ -64,7 +64,6 @@ case $OSTYPE in
       '-I[do not display idle processes]'
       '-i[interactive mode]'
       '-n[non-interactive mode (identical to batch mode)]'
-      '-o+[sort process display by the specified field]:field:( $fields )'
       '-p+[filter by the specified pid]: :_pids'
       '-q[renice top to -20]'
       '-S[show system processes]'
@@ -80,6 +79,7 @@ case $OSTYPE in
       '-j[display the jail ID]'
       '-t[do not display the top process]'
       '-m+[specify statistic type]:type:(( cpu\:default io ))'
+      '-o+[sort process display by the specified field]:field:( $fields )'
       '-P[per-cpu CPU usage statistics]'
       '(1 -)-v[write version number and exit]'
       '-w[display approximate swap usage]'
@@ -89,10 +89,14 @@ case $OSTYPE in
     );;
   openbsd*)
     fields+=( command )
+    order=( '-:reverse order' )
     specs+=(
       '-1[combine CPU statistic into one line]'
+      '-t[show the routing table instead of the wait channel]'
       '-C[show command arguments as well as process name]'
       '-g+[filter processes by the specified string]:string'
+      '-o+[sort process display by the specified field]:field:->sortkey'
+      '-T+[filter processes by the specified routing table]:routing table'
       '-U+[filter processes by the specified user]: :_users -M "L\:|-="'
     );;
   darwin*)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-07  1:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07  1:33 PATCH: update completions for openbsd 6.8 Oliver Kiddle

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git