1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-05 15:16:19 +02:00

47944: update completions for NetBSD 9

This commit is contained in:
Oliver Kiddle 2021-02-08 00:40:10 +01:00
parent 25d69da85c
commit 073092f89d
5 changed files with 19 additions and 6 deletions

View File

@ -1,5 +1,9 @@
2021-02-07 Oliver Kiddle <opk@zsh.org>
* 47944: Completion/BSD/Command/_bsd_pkg,
Completion/BSD/Command/_pkgin, Completion/BSD/Command/_systat,
Completion/Unix/Command/_dmesg: update completions for NetBSD 9
* 47943: Completion/Unix/Command/_date,
Completion/Unix/Command/_xargs: update completions for DragonflyBSD

View File

@ -144,6 +144,7 @@ _bsd_pkg() {
netbsd*)
flags+=(
'(:)-a[delete all installed packages]'
'(:)-A[remove automatically installed packages that are no longer required]'
"-D[don't execute deinstallation scripts]"
'-F[specify each package by an installed file]'
'-f[force deinstallation]'

View File

@ -26,7 +26,7 @@ _arguments -s -S -C \
'*:: :->restargs' && ret=0
if [[ -n $state ]]; then
cmds=( ${${${(f)"$(_call_program commands $pkgin -h 2>&1)"}[3,-1]/ - (#b)(?)/:$match:l}%.} )
cmds=( ${${${(f)"$(_call_program commands $pkgin -h 2>&1)"}[3,-1]/ - (#b)(?)/:$match:l}%.} )
short=( ${${cmds#*\(}/ #\)/} )
cmds=( ${cmds// #\(*\)/} )
if [[ $state = subcommands && ! -prefix - ]]; then

View File

@ -75,9 +75,10 @@ case $OSTYPE in
opts=(
'-M[alternative source to extract values from]:core:_files'
'-N[alternative source to extract the name list from]:system:_files'
'-n[do not resolve IP addresses]'
'-w[refresh interval]:refresh interval'
'-t[the amount of refreshes for each screen in '\''all'\'' display mode]:turns'
'(-t -w)-b[show the chosen display once and exit]'
"-n[don't resolve IP addresses]"
'(-b)-w[refresh interval]:refresh interval'
"(-b)-t[specify amount of refreshes for each screen in 'all' display mode]:turns"
)
esac

View File

@ -1,6 +1,6 @@
#compdef dmesg
local args
local -a args
case $OSTYPE in
linux*) args=( -S -- ) ;;
@ -27,6 +27,13 @@ case $OSTYPE in
'-n[use specified kernel core]:number'
)
;;
netbsd*)
args+=(
'-d[show timestamp deltas]'
'(-t)-T[format uptime timestamps in a human readable form]'
'(-T)-t[suppress printing uptime timestamps]'
)
;;
esac
_arguments -s $args
_arguments -s : $args