mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-08-11 02:51:07 +02:00
44279: completion updates for Dragonfly 5.4, FreeBSD 12 and OpenBSD 6.5
This commit is contained in:
parent
ffacb17886
commit
09c6acf7b2
21 changed files with 112 additions and 59 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2019-05-08 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* 44279: Completion/BSD/Command/_cu, Completion/BSD/Command/_gstat,
|
||||||
|
Completion/BSD/Command/_procstat, Completion/BSD/Command/_signify,
|
||||||
|
Completion/BSD/Command/_sockstat, Completion/BSD/Command/_vmctl,
|
||||||
|
Completion/Unix/Command/_arp, Completion/Unix/Command/_arping,
|
||||||
|
Completion/Unix/Command/_cp, Completion/Unix/Command/_date,
|
||||||
|
Completion/Unix/Command/_gcore, Completion/Unix/Command/_install,
|
||||||
|
Completion/Unix/Command/_ls, Completion/Unix/Command/_netstat,
|
||||||
|
Completion/Unix/Command/_ping, Completion/Unix/Command/_script,
|
||||||
|
Completion/Unix/Command/_tcpdump, Completion/Unix/Command/_top,
|
||||||
|
Completion/Unix/Command/_vmstat, Completion/Unix/Command/_zpool:
|
||||||
|
completion updates for Dragonfly 5.4, FreeBSD 12 and OpenBSD 6.5
|
||||||
|
|
||||||
2019-05-08 dana <dana@dana.is>
|
2019-05-08 dana <dana@dana.is>
|
||||||
|
|
||||||
* Oliver Kiddle: unposted: Test/Y01completion.ztst: Add compset tests
|
* Oliver Kiddle: unposted: Test/Y01completion.ztst: Add compset tests
|
||||||
|
@ -21,7 +35,7 @@
|
||||||
Completion/Zsh/Type/_file_descriptors,
|
Completion/Zsh/Type/_file_descriptors,
|
||||||
Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, NEWS,
|
Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, NEWS,
|
||||||
Src/Zle/comp.h, Src/Zle/compcore.c, Src/Zle/complete.c:
|
Src/Zle/comp.h, Src/Zle/compcore.c, Src/Zle/complete.c:
|
||||||
allow finer control of completion match soring with
|
allow finer control of completion match sorting with
|
||||||
arguments to compadd's -o option
|
arguments to compadd's -o option
|
||||||
|
|
||||||
* Gautam Iyer: gitlab !6: Completion/Unix/Command/_rclone:
|
* Gautam Iyer: gitlab !6: Completion/Unix/Command/_rclone:
|
||||||
|
|
|
@ -10,6 +10,7 @@ case $variant in
|
||||||
args+=(
|
args+=(
|
||||||
"-d[don't block waiting for a carrier to be detected]"
|
"-d[don't block waiting for a carrier to be detected]"
|
||||||
'-r[start cu in restricted mode - prevent local operations]'
|
'-r[start cu in restricted mode - prevent local operations]'
|
||||||
|
'-E+[specify escape character]:escape character [~]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
taylor|(net|free)bsd*)
|
taylor|(net|free)bsd*)
|
||||||
|
@ -18,7 +19,7 @@ case $variant in
|
||||||
'(-e -P --parity)-o[use odd parity]'
|
'(-e -P --parity)-o[use odd parity]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
(net|free)bsd*)
|
dragonfly*|(net|free)bsd*)
|
||||||
args+=( '-t[connect via a hard-wired connection to a host on a dial-up line]' )
|
args+=( '-t[connect via a hard-wired connection to a host on a dial-up line]' )
|
||||||
;|
|
;|
|
||||||
taylor|netbsd*)
|
taylor|netbsd*)
|
||||||
|
@ -53,12 +54,8 @@ case $variant in
|
||||||
'(-e -o --parity)-P+[set parity]:parity [none]:(even odd none)'
|
'(-e -o --parity)-P+[set parity]:parity [none]:(even odd none)'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
dragonfly*|freebsd*) args+=( '-a[set the acu port]:acu' ) ;|
|
||||||
args=( -A "-*" $args
|
freebsd*) args=( -A "-*" $args '-h[echo characters locally]' ) ;;
|
||||||
'-a[set the acu port]:acu'
|
|
||||||
'-h[echo characters locally]'
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_arguments -s $args \
|
_arguments -s $args \
|
||||||
|
|
|
@ -5,6 +5,7 @@ _arguments -s : \
|
||||||
'(-B)-b[batch mode]' \
|
'(-B)-b[batch mode]' \
|
||||||
'(-b)-B[endless batch mode]' \
|
'(-b)-B[endless batch mode]' \
|
||||||
'-c[enable the display geom(4) consumers]' \
|
'-c[enable the display geom(4) consumers]' \
|
||||||
|
'(-b -B)-C[CSV output mode]' \
|
||||||
'-d[enable the display delete operations]' \
|
'-d[enable the display delete operations]' \
|
||||||
'-f+[filter by regex]:regex' \
|
'-f+[filter by regex]:regex' \
|
||||||
'-o[enable the display for other operations]' \
|
'-o[enable the display for other operations]' \
|
||||||
|
|
|
@ -6,8 +6,10 @@ _arguments -s -A "-*" -S \
|
||||||
'-e[show environment variables]' \
|
'-e[show environment variables]' \
|
||||||
'-f[show file descriptor information]' \
|
'-f[show file descriptor information]' \
|
||||||
'-i[show signal pending and disposition]' \
|
'-i[show signal pending and disposition]' \
|
||||||
|
'-j[show signal pending and blocked information for process threads]' \
|
||||||
'-k[show stacks of kernel threads]' \
|
'-k[show stacks of kernel threads]' \
|
||||||
'-l[show resource limits]' \
|
'-l[show resource limits]' \
|
||||||
|
"-L[show LWP info for the process pertaining to it's signal driven exit]" \
|
||||||
'-r[show resource usage]' \
|
'-r[show resource usage]' \
|
||||||
'-s[show security credential information]' \
|
'-s[show security credential information]' \
|
||||||
'-S[show cpuset information]' \
|
'-S[show cpuset information]' \
|
||||||
|
|
|
@ -3,29 +3,30 @@
|
||||||
_arguments -s -S -A "-*" : \
|
_arguments -s -S -A "-*" : \
|
||||||
- checksum \
|
- checksum \
|
||||||
'-C[verify a signed checksum list and the checksum for each file]' \
|
'-C[verify a signed checksum list and the checksum for each file]' \
|
||||||
'-p[public key]:public key:_files' \
|
'-p+[public key]:public key:_files' \
|
||||||
'-q[quiet mode]' \
|
'-q[quiet mode]' \
|
||||||
'-x[signature file]:signature file:_files' \
|
'-x+[specify signature file]:signature file:_files' \
|
||||||
'*:file:_files' \
|
'*:file:_files' \
|
||||||
- generate \
|
- generate \
|
||||||
'-G[generate a new key pair]' \
|
'-G[generate a new key pair]' \
|
||||||
'-c[specify comment]:comment:' \
|
'-c+[specify comment]:comment' \
|
||||||
'-n[do not ask for passphrase]' \
|
"-n[don't ask for passphrase]" \
|
||||||
'-p[public key]:public key:_files' \
|
'-p+[specify public key file]:public key:_files' \
|
||||||
'-s[secret key]:secret key:_files' \
|
'-s+[specify secret key file]:secret key:_files' \
|
||||||
- sign \
|
- sign \
|
||||||
'-S[sign a message and create a signature]' \
|
'-S[sign a message and create a signature]' \
|
||||||
'-e[embed the message after the signature]' \
|
'-e[embed the message after the signature]' \
|
||||||
'-m[file containing message]:message file:_files' \
|
'-n[store a zero time stamp in the gzip(1) header (with -z)]' \
|
||||||
'-s[secret key]:secret key:_files' \
|
'-m+[specify file containing message to sign]:message file:_files' \
|
||||||
'-x[signature file]:signature file:_files' \
|
'-s+[specify secret key file]:secret key:_files' \
|
||||||
|
'-x+[specify signature file]:signature file:_files' \
|
||||||
'-z[embed signature in gzip header]' \
|
'-z[embed signature in gzip header]' \
|
||||||
- verify \
|
- verify \
|
||||||
'-V[verify the message and signature match]' \
|
'-V[verify the message and signature match]' \
|
||||||
'-e[extract the message from the signature]' \
|
'-e[extract the message from the signature]' \
|
||||||
'-m[file containing message to verify or destination to extract]:message file:_files' \
|
'-m+[specify file containing message to verify or destination to extract]:message file:_files' \
|
||||||
'-p[public key]:public key:_files' \
|
'-p+[specify public key file]:public key:_files' \
|
||||||
'-q[quiet mode]' \
|
'-q[quiet mode]' \
|
||||||
'-t[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \
|
'-t+[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \
|
||||||
'-x[signature file]:signature file:_files' \
|
'-x+[specify signature file]:signature file:_files' \
|
||||||
'-z[verify signature in gzip header]'
|
'-z[verify signature in gzip header]'
|
||||||
|
|
|
@ -13,6 +13,14 @@ case $OSTYPE in
|
||||||
'-u[show AF_LOCAL (UNIX) sockets]'
|
'-u[show AF_LOCAL (UNIX) sockets]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
freebsd<12->.*)
|
||||||
|
args+=(
|
||||||
|
'-S[display the protocol stack if applicable]'
|
||||||
|
'-U[display the remote UDP encapsulation port number if applicable]'
|
||||||
|
'-v[verbose mode]'
|
||||||
|
'-w[use wider field size for displaying addresses]'
|
||||||
|
)
|
||||||
|
;|
|
||||||
freebsd*)
|
freebsd*)
|
||||||
for proto in ${${(M)${(f)"$(</etc/protocols)"}##[a-z0-9]*}}; do
|
for proto in ${${(M)${(f)"$(</etc/protocols)"}##[a-z0-9]*}}; do
|
||||||
case $proto in
|
case $proto in
|
||||||
|
|
|
@ -29,6 +29,7 @@ subcommands=(
|
||||||
start:'start a VM'
|
start:'start a VM'
|
||||||
stop:'stop a VM'
|
stop:'stop a VM'
|
||||||
unpause:'resume a VM'
|
unpause:'resume a VM'
|
||||||
|
wait:'wait until specified VM has stopped'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (( CURRENT == 2 )); then
|
if (( CURRENT == 2 )); then
|
||||||
|
@ -37,7 +38,7 @@ else
|
||||||
local curcontext="${curcontext%:*}-${words[2]}:"
|
local curcontext="${curcontext%:*}-${words[2]}:"
|
||||||
shift words; (( CURRENT-- ))
|
shift words; (( CURRENT-- ))
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
console|pause|send|show|status|unpause)
|
console|pause|send|show|status|unpause|wait)
|
||||||
_vm_names
|
_vm_names
|
||||||
;;
|
;;
|
||||||
create)
|
create)
|
||||||
|
@ -50,7 +51,8 @@ else
|
||||||
shift words; (( CURRENT-- ))
|
shift words; (( CURRENT-- ))
|
||||||
_arguments \
|
_arguments \
|
||||||
'-s+[specify size]:size' \
|
'-s+[specify size]:size' \
|
||||||
'-b+[specify base disk]:base image:_files'
|
'(-i)-b+[specify base disk]:base image:_files'
|
||||||
|
'(-b)-i+[copy and convert input disk]:disk image:_files'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
load)
|
load)
|
||||||
|
@ -75,14 +77,15 @@ else
|
||||||
else
|
else
|
||||||
shift words; (( CURRENT-- ))
|
shift words; (( CURRENT-- ))
|
||||||
_arguments -s \
|
_arguments -s \
|
||||||
|
'-B+[force system to boot from specified device for this boot]:device:(cdrom disk net)' \
|
||||||
'-b+[boot with the specified kernel or BIOS image]:boot image:_files' \
|
'-b+[boot with the specified kernel or BIOS image]:boot image:_files' \
|
||||||
'-c[automatically connect to the VM console]' \
|
'-c[automatically connect to the VM console]' \
|
||||||
'*-d+[disk image file]:disk image:_files' \
|
'*-d+[disk image file]:disk image:_files' \
|
||||||
'-i+[number of network interfaces]:number: ' \
|
'-i+[number of network interfaces]:number: ' \
|
||||||
'-L[add a local network interface]' \
|
'-L[add a local network interface]' \
|
||||||
'-m+[memory size in megabytes]:megabytes: ' \
|
'-m+[specify memory size]:memory size (megabytes) [512]' \
|
||||||
'-n+[specify switch to attach]: :_vm_switches' \
|
'-n+[specify switch to attach]: :_vm_switches' \
|
||||||
'-r+[ISO image file for virtual CD-ROM]:ISO image:_files' \
|
'-r+[specify ISO image file for virtual CD-ROM]:ISO image:_files -g "*.iso(-.)"' \
|
||||||
'-t+[use existing VM as a template]: :_vm_names'
|
'-t+[use existing VM as a template]: :_vm_names'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -98,5 +101,8 @@ else
|
||||||
'-w[wait until the VM has been terminated]'
|
'-w[wait until the VM has been terminated]'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
_default
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -38,8 +38,6 @@ case $OSTYPE in
|
||||||
;;
|
;;
|
||||||
darwin*|freebsd*|dragonfly*)
|
darwin*|freebsd*|dragonfly*)
|
||||||
cmds+=( '(-n -i)-S[create an arp entry, replacing any existing entry]' )
|
cmds+=( '(-n -i)-S[create an arp entry, replacing any existing entry]' )
|
||||||
;|
|
|
||||||
darwin*|freebsd*)
|
|
||||||
args+=( '(-s -Q -f)-i+[select an interface]:interface:_net_interfaces' )
|
args+=( '(-s -Q -f)-i+[select an interface]:interface:_net_interfaces' )
|
||||||
;|
|
;|
|
||||||
darwin*)
|
darwin*)
|
||||||
|
|
|
@ -12,6 +12,7 @@ _arguments -s \
|
||||||
'-V[print version and exit]' \
|
'-V[print version and exit]' \
|
||||||
'-c[how many packets to send]:count' \
|
'-c[how many packets to send]:count' \
|
||||||
'-w[how long to wait for a reply]:timeout' \
|
'-w[how long to wait for a reply]:timeout' \
|
||||||
|
'-i[specify interval between packets]:interval (seconds)' \
|
||||||
'-I[interface]:ethernet interface:_net_interfaces' \
|
'-I[interface]:ethernet interface:_net_interfaces' \
|
||||||
'-s[source ip address]:source IP address:_hosts' \
|
'-s[source ip address]:source IP address:_hosts' \
|
||||||
':destination:_hosts'
|
':destination:_hosts'
|
||||||
|
|
|
@ -53,7 +53,7 @@ else
|
||||||
'solaris2.<11->*' '-/[preserve extended attributes and extended system attributes]' \
|
'solaris2.<11->*' '-/[preserve extended attributes and extended system attributes]' \
|
||||||
'(darwin|dragonfly|freebsd)*' "(-f -i)-n[don't overwrite existing file]" \
|
'(darwin|dragonfly|freebsd)*' "(-f -i)-n[don't overwrite existing file]" \
|
||||||
'netbsd*' "-N[don't copy file flags]" \
|
'netbsd*' "-N[don't copy file flags]" \
|
||||||
'(darwin|dragonfly|freebsd|netbsd)*' '-a[archive mode, same as -RpP]' \
|
'(darwin|dragonfly|freebsd|netbsd|openbsd)*' '-a[archive mode, same as -RpP]' \
|
||||||
'(dragonfly|freebsd)*' '-l[link files instead of copying]' \
|
'(dragonfly|freebsd)*' '-l[link files instead of copying]' \
|
||||||
'(darwin|dragonfly|*bsd)*' '-v[show file names as they are copied]' \
|
'(darwin|dragonfly|*bsd)*' '-v[show file names as they are copied]' \
|
||||||
'darwin*' "-X[don't copy extended attributes or resource forks]" \
|
'darwin*' "-X[don't copy extended attributes or resource forks]" \
|
||||||
|
|
|
@ -31,7 +31,7 @@ else
|
||||||
freebsd*|dragonfly*|darwin*|netbsd*|openbsd*)
|
freebsd*|dragonfly*|darwin*|netbsd*|openbsd*)
|
||||||
opts+=( -A '-*' )
|
opts+=( -A '-*' )
|
||||||
args+=(
|
args+=(
|
||||||
'-j[do not try to set date]'
|
"-j[don't try to set date]"
|
||||||
'2:format or date:->fmt_date'
|
'2:format or date:->fmt_date'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
@ -41,6 +41,7 @@ else
|
||||||
freebsd*|dragonfly*|darwin*|openbsd*)
|
freebsd*|dragonfly*|darwin*|openbsd*)
|
||||||
args+=(
|
args+=(
|
||||||
'-d+:daylight saving time value'
|
'-d+:daylight saving time value'
|
||||||
|
'-f+[use specified format for input]:parsing format:_date_formats:new date'
|
||||||
'-t+:minutes west of GMT'
|
'-t+:minutes west of GMT'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
@ -57,13 +58,11 @@ else
|
||||||
)
|
)
|
||||||
args+=(
|
args+=(
|
||||||
'-r+[reference time: file modification or literal time]:reference: _alternative $alts'
|
'-r+[reference time: file modification or literal time]:reference: _alternative $alts'
|
||||||
|
'(-R)-I-[display in ISO 8601 format]::precision:(date hours minutes seconds)'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
freebsd*|dragonfly*|darwin*)
|
freebsd*|dragonfly*|darwin*)
|
||||||
args+=(
|
args+=( "*-v+[adjust and print (but don't set) date]:[+-]value[ymwdHMS]" )
|
||||||
'-f+[use specified format for input]:parsing format:_date_formats:new date:'
|
|
||||||
'*-v+[adjust and print (but not set) date]:[+-]value[ymwdHMS]:'
|
|
||||||
)
|
|
||||||
;;
|
;;
|
||||||
freebsd*|dragonfly*)
|
freebsd*|dragonfly*)
|
||||||
args+=( '-R[display in RFC2822 format]' )
|
args+=( '-R[display in RFC2822 format]' )
|
||||||
|
|
|
@ -37,7 +37,6 @@ case $OSTYPE in
|
||||||
_arguments -s \
|
_arguments -s \
|
||||||
'-c+[write core file to specified file]:file:_files' \
|
'-c+[write core file to specified file]:file:_files' \
|
||||||
'-f[dump all available segments]' \
|
'-f[dump all available segments]' \
|
||||||
'-s[stop process while gathering image]' \
|
|
||||||
'::executable:' \
|
'::executable:' \
|
||||||
':pid:_pids'
|
':pid:_pids'
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -64,14 +64,16 @@ else
|
||||||
[[ $OSTYPE == (darwin|dragonfly)* ]] && args+=(
|
[[ $OSTYPE == (darwin|dragonfly)* ]] && args+=(
|
||||||
'-M[disable use of mmap(2)]'
|
'-M[disable use of mmap(2)]'
|
||||||
)
|
)
|
||||||
|
[[ $OSTYPE == (dragonfly|freebsd|netbsd)* ]] && args+=(
|
||||||
|
'(-C -c --compare)-l+[link files (rather than copy) using specified method]: :->linkflags'
|
||||||
|
'+N+[use user/group database files from specified directory]: :_directories'
|
||||||
|
'-U[indicate that install is unprivileged]'
|
||||||
|
)
|
||||||
[[ $OSTYPE == (freebsd|netbsd)* ]] && args+=(
|
[[ $OSTYPE == (freebsd|netbsd)* ]] && args+=(
|
||||||
'-D+[specify destination directory used for metadata log]: :_directories'
|
'-D+[specify destination directory used for metadata log]: :_directories'
|
||||||
'-h+[store digest in metadata log using specified method]: :->digests'
|
'-h+[store digest in metadata log using specified method]: :->digests'
|
||||||
'(-C -c --compare)-l+[link files (rather than copy) using specified method]: :->linkflags'
|
|
||||||
'-M+[log mtree(8) metadata for installed files to specified file]:metadata log file:_files'
|
'-M+[log mtree(8) metadata for installed files to specified file]:metadata log file:_files'
|
||||||
'+N+[use user/group database files from specified directory]: :_directories'
|
|
||||||
'-T+[specify mtree(8) tags to store in metadata log]:mtree(8) tags'
|
'-T+[specify mtree(8) tags to store in metadata log]:mtree(8) tags'
|
||||||
'-U[indicate that install is unprivileged]'
|
|
||||||
)
|
)
|
||||||
[[ $OSTYPE == netbsd* ]] || args+=(
|
[[ $OSTYPE == netbsd* ]] || args+=(
|
||||||
'-S[use temporary files to perform safe copy]'
|
'-S[use temporary files to perform safe copy]'
|
||||||
|
|
|
@ -81,10 +81,14 @@ if ! _pick_variant gnu=gnu unix --help; then
|
||||||
if [[ $OSTYPE = (dragonfly*|freebsd*) ]]; then
|
if [[ $OSTYPE = (dragonfly*|freebsd*) ]]; then
|
||||||
arguments+=(
|
arguments+=(
|
||||||
'(-A)-I[prevent -A from being automatically set for the super-user]'
|
'(-A)-I[prevent -A from being automatically set for the super-user]'
|
||||||
|
'(-1 -C -m -x)-D+[specify format for date]:format: _date_formats'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [[ $OSTYPE = dragonfly* ]]; then
|
if [[ $OSTYPE = dragonfly* ]]; then
|
||||||
arguments+=( '-y[display FSMID in long listing]' )
|
arguments+=(
|
||||||
|
'-_[use GMT based date and time output with nanotime timestamp]'
|
||||||
|
'-y[display FSMID in long listing]'
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
if [[ $OSTYPE = (freebsd*|darwin*) ]]; then
|
if [[ $OSTYPE = (freebsd*|darwin*) ]]; then
|
||||||
arguments+=( '(-c -u)-U[file creation time]' )
|
arguments+=( '(-c -u)-U[file creation time]' )
|
||||||
|
@ -92,9 +96,9 @@ if ! _pick_variant gnu=gnu unix --help; then
|
||||||
if [[ $OSTYPE = freebsd* ]]; then
|
if [[ $OSTYPE = freebsd* ]]; then
|
||||||
arguments+=(
|
arguments+=(
|
||||||
'-,[print file sizes grouped and separated by thousands]'
|
'-,[print file sizes grouped and separated by thousands]'
|
||||||
'-D+[specify format for date]:format: _date_formats'
|
|
||||||
'-y[with -t, sort filenames in the same order as the time]'
|
'-y[with -t, sort filenames in the same order as the time]'
|
||||||
'-Z[display MAC label]'
|
'-Z[display MAC label]'
|
||||||
|
'--color=-[control use of color]:color:(never always auto)'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [[ $OSTYPE = darwin* ]]; then
|
if [[ $OSTYPE = darwin* ]]; then
|
||||||
|
|
|
@ -269,6 +269,7 @@ case $OSTYPE in
|
||||||
)
|
)
|
||||||
interfaces+=(
|
interfaces+=(
|
||||||
'-c+[show specified number of updates, then exit]:count'
|
'-c+[show specified number of updates, then exit]:count'
|
||||||
|
'-e[show only the number of errors on the interface]'
|
||||||
'-q[only show interfaces that have seen packets]'
|
'-q[only show interfaces that have seen packets]'
|
||||||
'-t[show current value of the watchdog timer function]'
|
'-t[show current value of the watchdog timer function]'
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,6 +11,7 @@ case ${variant}:${${service#ping}:-4} in
|
||||||
args+=(
|
args+=(
|
||||||
'-d[set SO_DEBUG on the socket]'
|
'-d[set SO_DEBUG on the socket]'
|
||||||
'-n[show network addresses as numbers]'
|
'-n[show network addresses as numbers]'
|
||||||
|
'-M+[define mtu discovery]:mtu discovery:(do dont want)'
|
||||||
'-v[verbose output]'
|
'-v[verbose output]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
@ -104,9 +105,11 @@ case ${variant}:${${service#ping}:-4} in
|
||||||
'-z+[specify type of service]:type of service'
|
'-z+[specify type of service]:type of service'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
(freebsd|openbsd|darwin)*:6)
|
||||||
|
args+=( '-D[disable IPv6 fragmentation]' )
|
||||||
|
;|
|
||||||
(freebsd|darwin)*:6)
|
(freebsd|darwin)*:6)
|
||||||
args+=(
|
args+=(
|
||||||
'-D[disable IPv6 fragmentation]'
|
|
||||||
'-R[audible bell for no packet]'
|
'-R[audible bell for no packet]'
|
||||||
'-r[audible bell for each packet]'
|
'-r[audible bell for each packet]'
|
||||||
)
|
)
|
||||||
|
@ -149,16 +152,12 @@ case ${variant}:${${service#ping}:-4} in
|
||||||
'--apple-time[prints the time a packet was received]'
|
'--apple-time[prints the time a packet was received]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
openbsd*:4)
|
|
||||||
args+=(
|
|
||||||
'-T+[change TOS value]:TOS value:(critical inetcontrol lowdelay netcontrol throughput reliability ef af cs)'
|
|
||||||
)
|
|
||||||
;|
|
|
||||||
openbsd*)
|
openbsd*)
|
||||||
args+=(
|
args+=(
|
||||||
'-H[try reverse-lookups of addresses]'
|
'-H[try reverse-lookups of addresses]'
|
||||||
'-E[audible bell for no packet]'
|
'-E[audible bell for no packet]'
|
||||||
'-e[audible bell for each packet]'
|
'-e[audible bell for each packet]'
|
||||||
|
'-T+[change TOS value]:TOS value:(critical inetcontrol lowdelay netcontrol throughput reliability ef af cs)'
|
||||||
'-V+[specify routing table to be used]:routing table'
|
'-V+[specify routing table to be used]:routing table'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -34,10 +34,6 @@ case $OSTYPE in
|
||||||
darwin*|dragonfly*|netbsd*|freebsd*)
|
darwin*|dragonfly*|netbsd*|freebsd*)
|
||||||
args=(
|
args=(
|
||||||
'-q[be quiet: suppress display of starting and ending lines]'
|
'-q[be quiet: suppress display of starting and ending lines]'
|
||||||
)
|
|
||||||
;|
|
|
||||||
darwin*|netbsd*|freebsd*)
|
|
||||||
args+=(
|
|
||||||
'(-a -r -k)-d[suppress sleeps when playing back a session]'
|
'(-a -r -k)-d[suppress sleeps when playing back a session]'
|
||||||
'(-a -r -k -t)-p[play back a recorded session]'
|
'(-a -r -k -t)-p[play back a recorded session]'
|
||||||
'(-d -p)-r[record a session with input, output and timing data]'
|
'(-d -p)-r[record a session with input, output and timing data]'
|
||||||
|
@ -58,13 +54,13 @@ case $OSTYPE in
|
||||||
;|
|
;|
|
||||||
darwin*|dragonfly*|freebsd*)
|
darwin*|dragonfly*|freebsd*)
|
||||||
args+=(
|
args+=(
|
||||||
|
'-F[send output to specified named pipe]:fifo:_files -g "*(p)"'
|
||||||
'-t+[specify interval of data flushing]:interval (seconds)'
|
'-t+[specify interval of data flushing]:interval (seconds)'
|
||||||
'-k[log keys sent to the program as well as output]'
|
'-k[log keys sent to the program as well as output]'
|
||||||
'*:::arguments: _normal'
|
'*:::arguments: _normal'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
darwin*|freebsd*)
|
darwin*|freebsd*)
|
||||||
args+=( '-F[send output to specified named pipe]:fifo:_files -g "*(p)"' )
|
|
||||||
;|
|
;|
|
||||||
*)
|
*)
|
||||||
args+=(
|
args+=(
|
||||||
|
|
|
@ -134,6 +134,7 @@ if [[ $OSTYPE = openbsd* ]]; then
|
||||||
- capture
|
- capture
|
||||||
${(R)args:#(|\*)(|\(*\))--*} # removes any long-options
|
${(R)args:#(|\*)(|\(*\))--*} # removes any long-options
|
||||||
'(-n)-a[attempt to convert network and broadcast addresses to names]'
|
'(-n)-a[attempt to convert network and broadcast addresses to names]'
|
||||||
|
'-B+[specify drop action to be used when filter expression matches a packet]:drop action:(pass capture drop)'
|
||||||
'-D[select packet flowing in specified direction]:direction:(in out)'
|
'-D[select packet flowing in specified direction]:direction:(in out)'
|
||||||
'-I[print the interface on each dump line]'
|
'-I[print the interface on each dump line]'
|
||||||
'-o[print a guess of the possible operating system(s)]'
|
'-o[print a guess of the possible operating system(s)]'
|
||||||
|
|
|
@ -65,6 +65,7 @@ case $OSTYPE in
|
||||||
'-i[interactive mode]'
|
'-i[interactive mode]'
|
||||||
'-n[non-interactive mode (identical to batch mode)]'
|
'-n[non-interactive mode (identical to batch mode)]'
|
||||||
'-o+[sort process display by the specified field]:field:( $fields )'
|
'-o+[sort process display by the specified field]:field:( $fields )'
|
||||||
|
'-p+[filter by the specified pid]: :_pids'
|
||||||
'-q[renice top to -20]'
|
'-q[renice top to -20]'
|
||||||
'-S[show system processes]'
|
'-S[show system processes]'
|
||||||
'-s+[specify delay interval]:seconds:'
|
'-s+[specify delay interval]:seconds:'
|
||||||
|
@ -92,7 +93,6 @@ case $OSTYPE in
|
||||||
'-1[combine CPU statistic into one line]'
|
'-1[combine CPU statistic into one line]'
|
||||||
'-C[show command arguments as well as process name]'
|
'-C[show command arguments as well as process name]'
|
||||||
'-g+[filter processes by the specified string]:string'
|
'-g+[filter processes by the specified string]:string'
|
||||||
'-p+[filter by the specified pid]: :_pids'
|
|
||||||
'-U+[filter processes by the specified user]: :_users -M "L\:|-="'
|
'-U+[filter processes by the specified user]: :_users -M "L\:|-="'
|
||||||
);;
|
);;
|
||||||
darwin*)
|
darwin*)
|
||||||
|
|
|
@ -21,10 +21,9 @@ case $OSTYPE in
|
||||||
'(- :)'{-D,--disk-sum}'[summarize disk statistics]'
|
'(- :)'{-D,--disk-sum}'[summarize disk statistics]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*bsd*)
|
*bsd*|dragonfly*)
|
||||||
specs=(
|
specs=(
|
||||||
'-c+[specify number of times to refresh the display]:count'
|
'-c+[specify number of times to refresh the display]:count'
|
||||||
'-f[report on the number fork syscalls since boot and pages of virtual memory for each]'
|
|
||||||
'-i[report the number of interrupts taken by devices since boot]'
|
'-i[report the number of interrupts taken by devices since boot]'
|
||||||
'-M+[specify core file to extract values associated with the name list from]:core:_files'
|
'-M+[specify core file to extract values associated with the name list from]:core:_files'
|
||||||
'-N+[specify file to extract the name list from]:system:_files'
|
'-N+[specify file to extract the name list from]:system:_files'
|
||||||
|
@ -32,18 +31,27 @@ case $OSTYPE in
|
||||||
'*:disk:_files'
|
'*:disk:_files'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
|
*bsd*)
|
||||||
|
specs=(
|
||||||
|
'-f[report on the number fork syscalls since boot and pages of virtual memory for each]'
|
||||||
|
)
|
||||||
|
;|
|
||||||
|
freebsd*|dragonfly*)
|
||||||
|
specs+=(
|
||||||
|
'-m[report on the usage of kernel dynamic memory allocated using malloc(9) by type]'
|
||||||
|
'-n+[change the maximum number of disks to display]:number of disks to display [2]'
|
||||||
|
'*-p+[specify which types of devices to display]: :->devices'
|
||||||
|
'-s[display the contents of the SUM structure]'
|
||||||
|
'-z[report on memory used by the kernel zone allocator, uma(9), by zone]'
|
||||||
|
)
|
||||||
|
;|
|
||||||
freebsd*)
|
freebsd*)
|
||||||
specs+=(
|
specs+=(
|
||||||
'-a[include statistics about all interrupts]'
|
'-a[include statistics about all interrupts]'
|
||||||
'-h[human readable memory columns output]'
|
'-h[human readable memory columns output]'
|
||||||
'-H[scriptable memory columns output]'
|
'-H[scriptable memory columns output]'
|
||||||
'-m[report on the usage of kernel dynamic memory allocated using malloc(9) by type]'
|
|
||||||
'-n+[change the maximum number of disks to display]:number of disks to display'
|
|
||||||
'-o[list virtual memory objects]'
|
'-o[list virtual memory objects]'
|
||||||
'-P[report per-cpu system/user/idle cpu statistics]'
|
'-P[report per-cpu system/user/idle cpu statistics]'
|
||||||
'-p+[specify which types of devices to display]: :->devices'
|
|
||||||
'-s[display the contents of the SUM structure]'
|
|
||||||
'-z[report on memory used by the kernel zone allocator, uma(9), by zone]'
|
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
(net|open)bsd*)
|
(net|open)bsd*)
|
||||||
|
@ -73,6 +81,14 @@ case $OSTYPE in
|
||||||
'-W[print more information about kernel memory pools]'
|
'-W[print more information about kernel memory pools]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
dragonfly*)
|
||||||
|
specs+=(
|
||||||
|
'-b[use brief format for formatted numbers]'
|
||||||
|
'-o[report usage of kernel object cache]'
|
||||||
|
'-u[output unformatted numeric values]'
|
||||||
|
'-v[include IRQ numbers and IRQ target CPU numbers before device names (with -i)]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
freebsd*|solaris*)
|
freebsd*|solaris*)
|
||||||
specs+=(
|
specs+=(
|
||||||
'::disk:_files -W /dev -g "*(-%b)"'
|
'::disk:_files -W /dev -g "*(-%b)"'
|
||||||
|
|
|
@ -14,7 +14,7 @@ _zpool() {
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $implementation = openzfs ]] && [[ $OSTYPE != solaris* ]]; then
|
if [[ $implementation = openzfs ]] && [[ $OSTYPE != solaris* ]]; then
|
||||||
subcmds+=(labelclear)
|
subcmds+=( labelclear initialize )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
versions=(
|
versions=(
|
||||||
|
@ -158,6 +158,14 @@ _zpool() {
|
||||||
'::pool name:_zfs_pool'
|
'::pool name:_zfs_pool'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(initialize)
|
||||||
|
_arguments -A "-*" \
|
||||||
|
'(-c --cancel)'{-c,--cancel}'[cancel initializing on specified devices]' \
|
||||||
|
'(-s --suspend)'{-s,--suspend}'[suspend initializing on specified devices]' \
|
||||||
|
':pool name:_zfs_pool' \
|
||||||
|
'*:device:_files'
|
||||||
|
;;
|
||||||
|
|
||||||
(iostat)
|
(iostat)
|
||||||
_arguments -A "-*" \
|
_arguments -A "-*" \
|
||||||
'-l[Display configuration in /dev/chassis location form]' \
|
'-l[Display configuration in /dev/chassis location form]' \
|
||||||
|
|
Loading…
Reference in a new issue