summaryrefslogtreecommitdiffstats
path: root/Completion/BSD/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/BSD/Command')
-rw-r--r--Completion/BSD/Command/_bectl1
-rw-r--r--Completion/BSD/Command/_csup26
-rw-r--r--Completion/BSD/Command/_freebsd-update1
-rw-r--r--Completion/BSD/Command/_ipfw2
-rw-r--r--Completion/BSD/Command/_jail20
-rw-r--r--Completion/BSD/Command/_jls15
-rw-r--r--Completion/BSD/Command/_kdump2
-rw-r--r--Completion/BSD/Command/_ktrace2
-rw-r--r--Completion/BSD/Command/_mdo48
-rw-r--r--Completion/BSD/Command/_pfctl3
-rw-r--r--Completion/BSD/Command/_portaudit14
-rw-r--r--Completion/BSD/Command/_sockstat6
12 files changed, 80 insertions, 60 deletions
diff --git a/Completion/BSD/Command/_bectl b/Completion/BSD/Command/_bectl
index 484fa0159..8bbcdf628 100644
--- a/Completion/BSD/Command/_bectl
+++ b/Completion/BSD/Command/_bectl
@@ -43,6 +43,7 @@ if [[ $state = args ]]; then
args+=(
'-r[create recursive boot environment]'
'-e+[clone specified boot environment]: :->boot-environs'
+ '-E[create new empty boot environment]'
)
;;
destroy)
diff --git a/Completion/BSD/Command/_csup b/Completion/BSD/Command/_csup
deleted file mode 100644
index 69e13f3d1..000000000
--- a/Completion/BSD/Command/_csup
+++ /dev/null
@@ -1,26 +0,0 @@
-#compdef csup
-
-_arguments -s \
- '-1[disable automatic retries]' \
- '-4[force usage of IPv4 addresses]' \
- '-6[force usage of IPv6 addresses]' \
- '-A[local address to bind to when connecting to the server]:local address:_hosts' \
- '-b[base directory]:base directory:_files -/' \
- '-c[subdirectory of base for information about collections]:collections directory:_files -/' \
- '-d[maximum number of deleted files]:maximum number of deleted files:' \
- '-h[server host]:server host:_hosts' \
- '-i[include only files and directories matching]:file pattern:' \
- '-k[keep temporary copies of failed updates]' \
- '-l[lock file]:lock file:_files' \
- '-L[verbosity level]:verbosity level:(0 1 2)' \
- '-L0[verbosity level 0]' \
- '-L1[verbosity level 1]' \
- '-L2[verbosity level 2]' \
- '-p[server port]:port:_ports' \
- '-r[maximum number of retries]:maximum number of retries:' \
- '-s[suppress status checks]' \
- '-v[print version information]' \
- '(-Z)-z[enable compression]' \
- '(-z)-Z[disable compression]' \
- ':csup file:_files' \
- ':destination directory:_files -/'
diff --git a/Completion/BSD/Command/_freebsd-update b/Completion/BSD/Command/_freebsd-update
index af37641e4..0d1f008ac 100644
--- a/Completion/BSD/Command/_freebsd-update
+++ b/Completion/BSD/Command/_freebsd-update
@@ -22,5 +22,6 @@ _arguments \
'-r[specify the new release]:new release' \
'-s[fetch files from the specified server or server pool]:server:_hosts' \
'-t[mail output of cron command, if any, to address]:address' \
+ '-v[set output verbosity]:level [stats]:(stats nostats debug)' \
'--currently-running[assume specified release as current]:release' \
'*:command:_values -S " " -w "commands" $flags[@]'
diff --git a/Completion/BSD/Command/_ipfw b/Completion/BSD/Command/_ipfw
index b910aa34d..78dac206a 100644
--- a/Completion/BSD/Command/_ipfw
+++ b/Completion/BSD/Command/_ipfw
@@ -284,7 +284,7 @@ actions=(
\| $'/port_range[ \t\0]/'
'/[0-9]#-/' ': _message -e ports lower'
$word ': _message -e ports upper'
- \| $word ':parameters:config parameter:$ca ip if log deny_in same_ports unreg_only unreg_cgn reset reverse proxy_only skip_global redirect_port redirect_addr redirect_proto port_range'
+ \| $word ':parameters:config parameter:$ca ip if log deny_in same_ports unreg_only unreg_cgn udp_eim reset reverse proxy_only skip_global redirect_port redirect_addr redirect_proto port_range'
\) \#
\| $'/show[ \t\0]/' $word ':actions:action:(config log)'
\| '/[]/' ':commands:command:$ca config show' \)
diff --git a/Completion/BSD/Command/_jail b/Completion/BSD/Command/_jail
index 26d0a6a87..c3ccc5379 100644
--- a/Completion/BSD/Command/_jail
+++ b/Completion/BSD/Command/_jail
@@ -1,7 +1,7 @@
#compdef jail
local curcontext="$curcontext" ret=1
-local -a state state_descr line jails running alts suf
+local -a state state_descr line alts suf
local -A opt_args
_arguments -C -s \
@@ -32,19 +32,21 @@ if [[ -n $state ]]; then
*) _message -e values 'value' ;;
esac
elif compset -P name= || [[ $#line = 1 ]]; then
- if (( $+opt_args[-r] || $+opt_args[-m] )); then
- alts=( 'jails:jail:_jails' )
+ if (( $+opt_args[-r] || $+opt_args[-R] || $+opt_args[-m] )); then
+ alts=( 'jails:: _jails' )
elif (( $+opt_args[-c] )); then
- running=( ${${(f)"$(_call_program jails jls name)"}/ /:} )
- jails=( ${${(M)${(f)"$(<${opt_args[-f]:-/etc/jail.conf})"}:#[a-z]# #\{#(#e)}%% *} )
- alts=( "jails:jail:compadd - ${jails:|running}" )
+ if (( $+opt_args[-f] )); then
+ alts=( "jails:: _jails -c -f ${(q-)opt_args[-f]}" )
+ else
+ alts=( 'jails:: _jails -c' )
+ fi
fi
fi
- if [[ -z $IPREFIX ]]; then
+ if [[ -z $IPREFIX ]] && (( ! $+opt_args[-r] && ! $+opt_args[-R] )); then
compset -S '=*' || suf=( -qS = )
alts+=(
- 'parameters:parameter:compadd -r "\n\t\- =" - persist allow.{set_hostname,sysvipc,raw_sockets,chflags,mount{,.devfs,.fdescfs,.nullfs,.procfs,.linprocfs,.linsysfs,.tmpfs,.zfs},quotas,socket_af} mount.{devfs,fdescfs,procfs}'
- 'parameters:parameter:compadd $suf - jid name path ip{4,6}{,.addr{,sel}} vnet host.hostname host securelevel devfs_ruleset children.{max,cur} enforce_statfs cpuset.id osrelease osreldate command exec.{{,pre,post}{start,stop},clean,jail_user,system{,_jail}_user,timeout,consolelog,fib} stop.timeout {vnet.,}interface ip_hostname mount{,.fstab} depend'
+ 'parameters:parameter:compadd -r "\n\t\- =" - persist allow.{set_hostname,sysvipc,raw_sockets,chflags,mount{,.devfs,.fdescfs,.fusefs,.nullfs,.procfs,.linprocfs,.linsysfs,.tmpfs,.zfs},vmm,quotas,read_msgbuf,socket_af,mlock,nfsd,reserved_ports,unprivileged_{parent_tampering,proc_debug},suser,extattr,adjtime,settime,routing,setaudit} linux linux.{osrelease,oss_version} mount.{devfs,fdescfs,procfs}'
+ 'parameters:parameter:compadd $suf - jid name path ip{4,6}{,.addr,saddrsel} vnet host.hostname host securelevel devfs_ruleset children.{max,cur} enforce_statfs cpuset.id osrelease osreldate meta env command exec.{{,pre,post}{start,stop},clean,jail_user,system{,_jail}_user,timeout,consolelog,fib} stop.timeout {vnet.,}interface ip_hostname mount{,.fstab} depend zfs.dataset'
)
fi
(( $#alts )) && _alternative $alts && ret=0
diff --git a/Completion/BSD/Command/_jls b/Completion/BSD/Command/_jls
index a6f8a7eb6..f9ae10253 100644
--- a/Completion/BSD/Command/_jls
+++ b/Completion/BSD/Command/_jls
@@ -4,13 +4,14 @@ local curcontext=$curcontext state state_descr line
typeset -A opt_args
_arguments -C -s -w -A '-*' : \
- '-d[include diying jails]' \
- '-h[print header line]' \
- "-N[print jail's name instead of numeric ID]" \
- '-n[print parameters in ``name=value'\'\'' format]' \
- '-q[quote parameter value when it contains whitespace, quotes or empty string]' \
- '-s[print parameters suitable for passing to jail(8)]' \
- '-v[print a multiple-line summary per jail]' \
+ "(-h -N -n -q -s -v *)-c[only check for the jail's existence]" \
+ '-d[include dying jails]' \
+ '(-c)-h[print header line]' \
+ "(-c)-N[print jail's name instead of numeric ID]" \
+ '(-c)-n[print parameters in ``name=value'\'\'' format]' \
+ '(-c)-q[quote parameter value when it contains whitespace, quotes or empty string]' \
+ '(-c)-s[print parameters suitable for passing to jail(8)]' \
+ '(-c)-v[print a multiple-line summary per jail]' \
'-j[the jid or name of the jail to list]:jail:_jails' \
'*: :->parameters'
diff --git a/Completion/BSD/Command/_kdump b/Completion/BSD/Command/_kdump
index e5c7c4cce..45fe77137 100644
--- a/Completion/BSD/Command/_kdump
+++ b/Completion/BSD/Command/_kdump
@@ -37,7 +37,7 @@ local args=(
'-t[select which tracepoints to display]: :_ktrace_points'
)
-case $OSTYPE; in
+case $OSTYPE in
freebsd*|netbsd*)
args+=(
'(-R -T)-E[display elapsed timestamps]'
diff --git a/Completion/BSD/Command/_ktrace b/Completion/BSD/Command/_ktrace
index 9613ba2bf..99dc23d1a 100644
--- a/Completion/BSD/Command/_ktrace
+++ b/Completion/BSD/Command/_ktrace
@@ -13,7 +13,7 @@ local args=(
'*:: : _normal -p ktrace'
)
-case $OSTYPE; in
+case $OSTYPE in
openbsd*)
args+=(
'-B[process relocations immediately]'
diff --git a/Completion/BSD/Command/_mdo b/Completion/BSD/Command/_mdo
new file mode 100644
index 000000000..9bb5224e8
--- /dev/null
+++ b/Completion/BSD/Command/_mdo
@@ -0,0 +1,48 @@
+#compdef mdo
+
+local environ e cmd cpp sep
+local -a _comp_priv_prefix suf reset
+local curcontext="$curcontext" state line expl
+local -A opt_args
+
+zstyle -a ":completion:${curcontext}:" environ environ
+
+for e in "${environ[@]}"
+do local -x "$e"
+done
+
+cmd="$words[1]"
+cpp='_comp_priv_prefix=( $cmd ${(kv)opt_args} )'
+_arguments -s -S -A '-*' : \
+ '(- *)-h[display usage information]' \
+ '--euid=[override effective user]:user:_users' \
+ '--egid=[override effective group]:group:_groups' \
+ '-G+[set supplementary groups]:group:_sequence _groups' \
+ '-g+[set primary group]:group:_groups' \
+ '-i[keep current primary and supplementary groups]' \
+ '(-u -i)-k[use current credentials as baseline]' \
+ '--ruid=[override real user]:user:_users' \
+ '--rgid=[override real group]:group:_groups' \
+ '-s+[incrementally modify the supplementary groups set]: :->group-mods' \
+ '--svuid=[override saved user]:user:_users' \
+ '--svgid=[override saved group]:group:_groups' \
+ '-u+[run command as specified user]: :_users' \
+ "(-)1: :{ $cpp; _command_names -e }" \
+ "*:: :{ $cpp; _normal }" && return
+
+if [[ $state = group-mods ]]; then
+ line=(
+ $opt_args[-g] ${(s.,.)opt_args[-G]}
+ ${${(s.,.)${(M)PREFIX##*,}}#[-+@]}
+ ${${(s.,.)${(M)SUFFIX%%,*}}#[-+@]}
+ )
+ compset -P '*,' || reset=( @ )
+ compset -S ',*' || suf=( -qS, )
+ if ! compset -P '[-+@]'; then
+ zstyle -s ":completion:${curcontext}:modifiers" list-separator sep || sep=--
+ _wanted modifiers expl 'group modifier' compadd -S "" -d \
+ "(-\ $sep\ exclude +\ $sep\ include @\ $sep\ reset)" - - + $reset
+ else
+ _wanted groups expl group _groups $suf -F line
+ fi
+fi
diff --git a/Completion/BSD/Command/_pfctl b/Completion/BSD/Command/_pfctl
index 8063eb504..a664b6dd7 100644
--- a/Completion/BSD/Command/_pfctl
+++ b/Completion/BSD/Command/_pfctl
@@ -94,11 +94,12 @@ case $OSTYPE in
args+=(
'-M[kill matching states in the opposite direction]'
'-P[display ports numerically]'
+ "-S[don't perform domain name resolution]"
)
;;
esac
-_arguments -s $args \
+_arguments -s : $args \
'-a[apply flags -f, -F, and -s only to the rules in the specified anchor]:anchor' \
'-F+[flush the filter parameters specified by modifier]:modifier:(($pfctl_flush_modifiers))' \
'-D+[define macro to be set to value]:macro' \
diff --git a/Completion/BSD/Command/_portaudit b/Completion/BSD/Command/_portaudit
deleted file mode 100644
index 788248d7f..000000000
--- a/Completion/BSD/Command/_portaudit
+++ /dev/null
@@ -1,14 +0,0 @@
-#compdef portaudit
-
-_arguments -s \
- '-a[vulnerability report for all installed packages]' \
- '-C[vulnerability report for the port in the current working directory]' \
- '-d[print creation date of the database]' \
- '-F[fetch the current database]' \
- '-q[quiet mode]' \
- '-V[show portaudit version number]' \
- '-v[verbose mode]' \
- '-X[download a fresh database from least days old]:days:' \
- '-f[check the packages listed in file]:file:_files' \
- '-r[restrict listed vulnerabilities with eregex pattern]:eregex:' \
- ':pkg-name:'
diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_sockstat
index 953072429..a5c29e116 100644
--- a/Completion/BSD/Command/_sockstat
+++ b/Completion/BSD/Command/_sockstat
@@ -31,10 +31,16 @@ case $OSTYPE in
;|
freebsd<14->.*)
args+=(
+ '-b[show TCP black box logging socket state]'
'-I[show local address of socket to which the current socket is spliced]'
'-f[show the FIB number of each socket]'
)
;|
+ freebsd<15->.*)
+ args+=(
+ '-A[show address of associated protocol control block (PCB)]'
+ )
+ ;|
freebsd*)
for proto in ${${(M)${(f)"$(</etc/protocols)"}##[a-z0-9]*}}; do
case $proto in