summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_cmp14
-rw-r--r--Completion/Unix/Command/_date4
-rw-r--r--Completion/Unix/Command/_elfdump11
-rw-r--r--Completion/Unix/Command/_gcore1
-rw-r--r--Completion/Unix/Command/_ifconfig17
-rw-r--r--Completion/Unix/Command/_iostat2
-rw-r--r--Completion/Unix/Command/_ldd3
-rw-r--r--Completion/Unix/Command/_ls13
-rw-r--r--Completion/Unix/Command/_mktemp54
-rw-r--r--Completion/Unix/Command/_netstat3
-rw-r--r--Completion/Unix/Command/_script6
-rw-r--r--Completion/Unix/Command/_service5
-rw-r--r--Completion/Unix/Command/_split13
-rw-r--r--Completion/Unix/Command/_ssh2
-rw-r--r--Completion/Unix/Command/_sysctl8
15 files changed, 100 insertions, 56 deletions
diff --git a/Completion/Unix/Command/_cmp b/Completion/Unix/Command/_cmp
index 6d7bfb1b7..20d309e32 100644
--- a/Completion/Unix/Command/_cmp
+++ b/Completion/Unix/Command/_cmp
@@ -1,23 +1,29 @@
#compdef cmp gcmp
-local args variant
+local args variant units
_pick_variant -r variant gnu=GNU $OSTYPE --version
case $variant in
- gnu)
+ freebsd*|gnu)
args=(
'(-b --print-bytes)'{-b,--print-bytes}'[print differing bytes]'
'(-i --ignore-initial)'{-i+,--ignore-initial}'[skip specified number of bytes]:bytes'
'(-l --verbose -s --silent --quiet)'{-l,--verbose}'[output all differences]'
'(-n --bytes)'{-n+,--bytes=}'[specify maximum bytes to compare]:bytes'
'(-s --quiet --silent -l --verbose)'{-s,--quiet,--silent}'[return status alone signifies differences]'
+ )
+ units=":_numbers -u bytes offset K M G T P E Z Y"
+ ;|
+ gnu)
+ args=(
'(- *)'{-v,--version}'[display version information]'
'(- *)--help[display help information]'
)
+ units+=" kB MB GB TB PB EB ZB YB"
;;
netbsd*) args+=( "-c[don't use mmap]" ) ;|
freebsd*|openbsd*)
- args=(
+ args+=(
"-h[don't follow symbolic links]"
'-x[hexadecimal output and zero based offset index]'
'-z[compare file sizes first]'
@@ -31,4 +37,4 @@ case $variant in
;;
esac
-_arguments -s $args '1:file 1:_files' '2:file 2:_files' '::byte offset' '::byte offset'
+_arguments -s $args '1:file 1:_files' '2:file 2:_files' "::byte offset$units" "::byte offset$units"
diff --git a/Completion/Unix/Command/_date b/Completion/Unix/Command/_date
index 9add1a9bc..a15d30b21 100644
--- a/Completion/Unix/Command/_date
+++ b/Completion/Unix/Command/_date
@@ -76,8 +76,8 @@ else
;|
openbsd*|netbsd*) args+=( '-a[gradually skew]' )
;|
- openbsd*)
- args+=( '-z[specify timezone for output]:time zone:_time_zone')
+ freebsd<14->.*|openbsd*)
+ args+=( '-z+[specify timezone for output]:time zone:_time_zone')
;|
netbsd*)
args+=( '-d[output date specified by string]:time string:' )
diff --git a/Completion/Unix/Command/_elfdump b/Completion/Unix/Command/_elfdump
index 065f4b97f..b3cc77695 100644
--- a/Completion/Unix/Command/_elfdump
+++ b/Completion/Unix/Command/_elfdump
@@ -34,10 +34,15 @@ case $OSTYPE in
'-l[show long section names without truncation]'
'-O[specify osabi to apply]:osabi'
'-P[use alternative section header]'
- "*:elf file:_object_files"
)
;;
- freebsd*) args+=( '-a[dump all information]' ) ;;
+ freebsd*)
+ args+=(
+ '-a[dump all information]'
+ '(-)-E[return success if file is an ELF file and failure if not]'
+ )
+ ;;
esac
-_arguments -s $args
+_arguments -s $args \
+ "*:elf file:_object_files"
diff --git a/Completion/Unix/Command/_gcore b/Completion/Unix/Command/_gcore
index a31a81267..ef3afd919 100644
--- a/Completion/Unix/Command/_gcore
+++ b/Completion/Unix/Command/_gcore
@@ -46,6 +46,7 @@ case $OSTYPE in
_arguments -s \
'-c+[write core file to specified file]:file:_files' \
'-f[dump all available segments]' \
+ '-k[use the ptrace(2) PT_COREDUMP kernel facility to write the core dump]' \
'::executable:' \
':pid:_pids'
;;
diff --git a/Completion/Unix/Command/_ifconfig b/Completion/Unix/Command/_ifconfig
index 25ddd55bd..4e1f25e2e 100644
--- a/Completion/Unix/Command/_ifconfig
+++ b/Completion/Unix/Command/_ifconfig
@@ -20,10 +20,20 @@ case $OSTYPE in
)
;;
freebsd*|dragonfly*)
- args=( -s $updown
- '(-a -l -u -d -m -L 1 *)-C[list interface cloners]'
+ args=( -s $updownlist
+ '(-a -j -f -l -G -g -u -d -m -L 1 *)-C[list interface cloners]'
+ '(-C)-f+[control the output format]: :_values -s, -S\: format
+ "addr[adjust inet address display]\:format [numeric]\:(default fqdn host numeric)"
+ "ether[adjust ethernet address display]\:format [colon]\:(colon dash dotted default)"
+ "inet[adjust inet subnet mask display]\:format [hex]\:(default cidr dotted hex)"
+ "inet6[adjust inet6 prefix display]\:format [numeric]\:(default cidr numeric)"'
+ '(-C)-G+[exclude members of the specified group]:group'
+ '(-C)-g+[limit output to members of the specified group]:group'
+ '(-C)-k[print keying information for the interface]'
'(-l -C)-m[list supported media]'
+ '(-C)-n[disable automatic loading of network interface drivers]'
'(-l -C)-L[show address lifetime as time offset]'
+ '(-C)-v[get more verbose status for an interface]'
)
listopts=(
active caps chan countries mac mesh regdomain roam txparam txpower
@@ -37,6 +47,9 @@ case $OSTYPE in
roam roam:rssi roam:rate roaming
)
;|
+ freebsd<14->.*)
+ args+=( '(-C)-j+[perform actions inside jail]:jail:_jails' )
+ ;;
dragonfly*)
args+=( '-n[disable auto-loading of kernel network interface driver]' )
;;
diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_iostat
index 1152b0d8b..d3943fcb4 100644
--- a/Completion/Unix/Command/_iostat
+++ b/Completion/Unix/Command/_iostat
@@ -34,7 +34,6 @@ case $OSTYPE:l in
args+=(
'-x[show extended disk statistics]'
'-z[omit lines for devices with no activity]'
- '(* -)-?[display a usage statement and exit]'
)
;;
dragonfly*)
@@ -126,6 +125,7 @@ case $OSTYPE:l in
parser=( -s )
args=(
'-c[display CPU utilization report]'
+ "--compact[don't break into sub-reports keeping metrics to a single line]"
'-d[display device utilization report]'
'--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)'
'-f[specify alternative directory to read device statistics from]:directory:_directories'
diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd
index 3c7b088df..98ac41e14 100644
--- a/Completion/Unix/Command/_ldd
+++ b/Completion/Unix/Command/_ldd
@@ -30,8 +30,7 @@ else
freebsd*)
args=(
'-a[show all objects that are needed by each loaded object]'
- '-v[verbose listing of the dynamic linking headers]'
- '-f+[specify format]:format:((%a\:program\ name %A\:environment\ name %o\:library\ name %p\:path\ to\ library %x\:load\ address))'
+ '*-f+[specify format]:format:((%a\:program\ name %A\:environment\ name %o\:library\ name %p\:path\ to\ library %x\:load\ address))'
)
;;
esac
diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls
index df14e7e2c..975a28196 100644
--- a/Completion/Unix/Command/_ls
+++ b/Completion/Unix/Command/_ls
@@ -96,6 +96,7 @@ if ! _pick_variant gnu=gnu unix --help; then
if [[ $OSTYPE = freebsd* ]]; then
arguments+=(
'-,[print file sizes grouped and separated by thousands]'
+ '(-S -f -t -U)-v[sort by version (filename treated numerically)]'
'-y[with -t, sort filenames in the same order as the time]'
'-Z[display MAC label]'
'--color=-[control use of color]:color:(never always auto)'
@@ -163,12 +164,12 @@ else
'(-a --all -U -l --format -s --size -t --sort --full-time)-f[unsorted, all, short list]'
'(--reverse -r -U -f)'{--reverse,-r}'[reverse sort order]'
- '(--sort -t -U -v -X)-S[sort by size]'
- '(--sort -S -U -v -X)-t[sort by modification time]'
- '(--sort -S -t -v -X)-U[unsorted]'
- '(--sort -S -t -U -X)-v[sort by version (filename treated numerically)]'
- '(--sort -S -t -U -v)-X[sort by extension]'
- '(-S -t -U -v -X)--sort=[specify sort key]:sort key:(size time none version extension)'
+ '(--sort -f -t -U -v -X)-S[sort by size]'
+ '(--sort -f -S -U -v -X)-t[sort by modification time]'
+ '(--sort -f -S -t -v -X)-U[unsorted]'
+ '(--sort -f -S -t -U -X)-v[sort by version (filename treated numerically)]'
+ '(--sort -f -S -t -U -v)-X[sort by extension]'
+ '(-S -f -t -U -v -X)--sort=[specify sort key]:sort key:(size time none version extension)'
'--color=-[control use of color]:color:(never always auto)'
"*--hide=[like -I, but overridden by -a or -A]:pattern: "
diff --git a/Completion/Unix/Command/_mktemp b/Completion/Unix/Command/_mktemp
index 03fc89e36..0f66d744e 100644
--- a/Completion/Unix/Command/_mktemp
+++ b/Completion/Unix/Command/_mktemp
@@ -1,43 +1,45 @@
#compdef mktemp gmktemp
local variant
-local args
+local -a args
-_pick_variant -r variant busybox=BusyBox gnu='Free Soft' unix --version
+_pick_variant -r variant busybox=BusyBox gnu='Free Soft' $OSTYPE --version
args=(
'(-d --directory)'{-d,--directory}'[make directory instead of file]'
- '(: -)--help[display help information]'
- '(-p --tmpdir)'{-p+,--tmpdir=}'[make relative to specified directory]: :_directories'
'(-q --quiet)'{-q,--quiet}'[suppress error messages]'
- '--suffix=[append specified suffix to template]:template suffix'
- '-t[interpret template as single path component relative to temp dir]'
'(-u --dry-run)'{-u,--dry-run}'[print file name only]'
- '(: -)'{-V,--version}'[display version information]'
- '1: :_guard "^-*" "template name"'
)
-# Non-GNU variants don't support long options (except BusyBox's --help)
-if [[ $variant == *busybox* ]]; then # See also: _busybox
- args=( ${args:#((#s)|*\))(\*|)--^help*} )
-elif [[ $variant != gnu ]]; then
- args=( ${args:#((#s)|*\))(\*|)--*} )
-fi
-
-[[ $variant == gnu ]] || {
- # BusyBox, OpenBSD, and Solaris have -p, but -t doesn't take an argument
- if [[ $variant == *busybox* ]] || [[ $OSTYPE == (openbsd|solaris)* ]]; then
- args=( ${args:#((#s)|*\))(\*|)-t*} )
- args+=( '-t[generate template relative to temp dir]' )
- # Dragonfly, FreeBSD, and Darwin take an argument to -t and support any number
- # of template files. These OSes do not have -p and -V.
- else
- args=( ${args:#((#s)|*\))(1:*|(\*|)-[ptV]*)} )
+case $variant in
+ ^(dragonfly|darwin)*)
+ args+=( '(-p --tmpdir)'{-p+,--tmpdir=}'[make relative to specified directory]: :_directories' )
+ ;|
+ gnu)
+ args+=(
+ '--suffix=[append specified suffix to template]:template suffix'
+ '(: -)'{-V,--version}'[display version information]'
+ )
+ ;|
+ # Most variants don't support long options (except BusyBox's --help)
+ ^(gnu|freebsd*))
+ args=( ${args:#((#s)|*\))(\*|)--*} )
+ ;|
+ gnu|*busybox*)
+ args+=( '(: -)--help[display help information]' )
+ ;|
+ (gnu|*busybox|openbsd|solaris)*)
+ args+=(
+ '-t[generate template relative to temp dir]'
+ '1: :_guard "^-*" "template name"'
+ )
+ ;;
+ (dragonfly|netbsd|freebsd|darwin)*)
args+=(
'-t[generate template relative to temp dir using specified prefix]:template prefix'
'*: :_guard "^-*" "template name"'
)
- fi
-}
+ ;;
+esac
_arguments -s -S : $args
diff --git a/Completion/Unix/Command/_netstat b/Completion/Unix/Command/_netstat
index 8016b2475..35d639f99 100644
--- a/Completion/Unix/Command/_netstat
+++ b/Completion/Unix/Command/_netstat
@@ -302,6 +302,9 @@ case $OSTYPE in
memory+=( $Xopt) statistics+=( $Xopt )
pcb+=( $Mopts $popt )
;;
+ freebsd<14->.*)
+ args+=( '-j+[run inside a jail]:jail:_jails' )
+ ;&
freebsd<13->.*)
sockets+=(
'-c[show TCP stack used for each session]'
diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script
index f39cfe535..d38d56f2e 100644
--- a/Completion/Unix/Command/_script
+++ b/Completion/Unix/Command/_script
@@ -47,7 +47,7 @@ case $OSTYPE in
'-q[be quiet: suppress display of starting and ending lines]'
'(-a -r -k)-d[suppress sleeps when playing back a 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 -T)-r[record a session with input, output and timing data]'
)
;|
netbsd*|openbsd*)
@@ -60,7 +60,9 @@ case $OSTYPE in
;|
freebsd*)
args+=(
+ '-e[return exit status of the child process]'
'-f[use filemon(4)]'
+ '(-a -r -k -t)-T[play back a recorded session, reporting only timestamps]: :_date_formats'
)
;|
darwin*|dragonfly*|freebsd*)
@@ -71,8 +73,6 @@ case $OSTYPE in
'*:::arguments: _normal $service'
)
;|
- darwin*|freebsd*)
- ;|
*)
args+=(
'(-p -d)-a[append output]'
diff --git a/Completion/Unix/Command/_service b/Completion/Unix/Command/_service
index 1216f57a8..28563429b 100644
--- a/Completion/Unix/Command/_service
+++ b/Completion/Unix/Command/_service
@@ -10,8 +10,11 @@ zstyle -T ":completion:${ctx}" tag-order && \
zstyle ":completion:${ctx}" tag-order init
case $OSTYPE in
+ freebsd<14->.*)
+ args=( '-E+[set environment variable before executing the rc.d script]:variable:_parameters -g "*export*~*readonly*" -S=' )
+ ;&
freebsd<11->.*)
- args=( '-j+[perform actions in specified jail]:jail:_jails' )
+ args+=( '-j+[perform actions in specified jail]:jail:_jails' )
;&
freebsd*|dragonfly*)
actions=(
diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_split
index c5ab0dc9b..5ecc1bb67 100644
--- a/Completion/Unix/Command/_split
+++ b/Completion/Unix/Command/_split
@@ -8,7 +8,7 @@ _pick_variant -r variant gnu=GNU $OSTYPE --version
args=(
'-a+[generate suffixes of specified length]:length [2]' \
- '(-l -p -n)-b+[put specified size in bytes in each output file]:size (bytes)' \
+ '(-l -p -n)-b+[put specified size in bytes in each output file]: :_numbers -u bytes size k m g' \
'(-b -p -n)-l+[put specified number of lines/records in each output file]:lines' \
'1:file:_files' \
'2: :_guard "^-*" "prefix [x]"'
@@ -19,8 +19,8 @@ case $variant in
args=( -C
'(H -a --suffix-length)'{-a+,--suffix-length=}'[generate suffixes of specified length]:length [2]'
'(H)--additional-suffix=[append an additional suffix to file names]:suffix'
- '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in bytes in each output file]:size (bytes)'
- '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-bytes=}'[put whole lines/records up to size limit in each output file]:size (bytes)'
+ '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in each output file]: :_numbers -M "m\:{a-zA-Z}={A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' \
+ '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-bytes=}'[put whole lines/records up to size limit in each output file]: :_numbers -M "m\:{a-zA-Z}={A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}'
'(H --numeric-suffixes -x --hex-suffixes)-d[use numeric suffixes starting at 0]'
'(H -d -x --hex-suffixes)--numeric-suffixes=-[use numeric suffixes]::start value [0]'
'(H -d --numeric-suffixes --hex-suffixes)-x[use hex suffixes starting at 0]'
@@ -47,7 +47,12 @@ case $variant in
'(-b -l -n)-p+[split the file whenever a line matches specified pattern]:pattern'
)
;|
- freebsd*) args+=( '-d[use numeric suffixes]' ) ;;
+ freebsd*)
+ args+=(
+ '-d[use numeric suffixes]'
+ "-c[continue creating files and don't overwrite existing output files]"
+ )
+ ;;
esac
_arguments -s -S $args && ret=0
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 0ba1f3775..dc3979a58 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -57,7 +57,7 @@ _ssh () {
"-N[don't execute a remote command]" \
'-n[redirect stdin from /dev/null]' \
'-O+[control an active connection multiplexing master process]:multiplex control command:((check\:"check master process is running" exit\:"request the master to exit" forward\:"request forward without command execution" stop\:"request the master to stop accepting further multiplexing requests" cancel\:"cancel existing forwardings with -L and/or -R" proxy))' \
- '-P[use non privileged port]' \
+ '-P+[specify a tag name that may be used to select configuration]:tag' \
'-p+[specify port on remote host]:port number on remote host' \
'(-v)*-q[quiet operation]' \
'*-R+[specify remote port forwarding]:remote port forwarding:->forward' \
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index 0416ca05e..442953c4d 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -28,6 +28,12 @@ case $OSTYPE in
'(- :)'{-V,--version}'[display version info and exit]' \
'*:sysctl variable:_files -W /proc/sys'
;;
+ freebsd<14->.*)
+ args+=(
+ '-F[print the format of the variable]'
+ '(-N)-l[show the length of variables along with their values]'
+ )
+ ;|
freebsd<11->.*)
args+=(
'-B[specify buffer size for reading]:buffer size'
@@ -53,7 +59,7 @@ case $OSTYPE in
'-d[print the description of the variable instead of its value]' \
'(-N -n)-e[separate name and value with =]' \
"-i[silently exit if variable doesn't exist]" \
- '(-n)-N[show only variable names]' \
+ '(-n -l)-N[show only variable names]' \
'(-N)-n[show only variable values]' \
'(-x)-o[show opaques as well (values suppressed)]' \
'-q[suppress some warnings]' \