summaryrefslogtreecommitdiff
path: root/Completion/BSD/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/BSD/Command')
-rw-r--r--Completion/BSD/Command/_bsd_pkg4
-rw-r--r--Completion/BSD/Command/_cu11
-rw-r--r--Completion/BSD/Command/_fetch2
-rw-r--r--Completion/BSD/Command/_gstat1
-rw-r--r--Completion/BSD/Command/_mixerctl2
-rw-r--r--Completion/BSD/Command/_pkgin79
-rw-r--r--Completion/BSD/Command/_procstat2
-rw-r--r--Completion/BSD/Command/_signify27
-rw-r--r--Completion/BSD/Command/_sockstat8
-rw-r--r--Completion/BSD/Command/_vmctl67
10 files changed, 142 insertions, 61 deletions
diff --git a/Completion/BSD/Command/_bsd_pkg b/Completion/BSD/Command/_bsd_pkg
index d8928afaf..25d4f346a 100644
--- a/Completion/BSD/Command/_bsd_pkg
+++ b/Completion/BSD/Command/_bsd_pkg
@@ -215,7 +215,7 @@ _bsd_pkg() {
'-N[show which packages each package was built with]'
'-n[show which packages each package needs]'
'-p[show installation prefixes]'
- '-Q[show the definition of the speficied variable from the build information]:variable:'
+ '-Q[show the definition of the specified variable from the build information]:variable:'
'-r[show list of installed requiring packages recursively]'
'-S[show total size occupied by each package and its dependents]'
'-u[show information for all user-installed packages]'
@@ -227,7 +227,7 @@ _bsd_pkg() {
flags+=(
'(:)-A[show all installed packages, including internal packages]'
'-C[show certificate information]'
- '-E[show the package that contains the speficied file]:file:_files'
+ '-E[show the package that contains the specified file]:file:_files'
# XXX only with -L
'-K[prefix filenames with category keywords]'
'-M[show the install-message file]'
diff --git a/Completion/BSD/Command/_cu b/Completion/BSD/Command/_cu
index df38d6ed7..5876820e5 100644
--- a/Completion/BSD/Command/_cu
+++ b/Completion/BSD/Command/_cu
@@ -10,6 +10,7 @@ case $variant in
args+=(
"-d[don't block waiting for a carrier to be detected]"
'-r[start cu in restricted mode - prevent local operations]'
+ '-E+[specify escape character]:escape character [~]'
)
;;
taylor|(net|free)bsd*)
@@ -18,7 +19,7 @@ case $variant in
'(-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]' )
;|
taylor|netbsd*)
@@ -53,12 +54,8 @@ case $variant in
'(-e -o --parity)-P+[set parity]:parity [none]:(even odd none)'
)
;;
- freebsd*)
- args=( -A "-*" $args
- '-a[set the acu port]:acu'
- '-h[echo characters locally]'
- )
- ;;
+ dragonfly*|freebsd*) args+=( '-a[set the acu port]:acu' ) ;|
+ freebsd*) args=( -A "-*" $args '-h[echo characters locally]' ) ;;
esac
_arguments -s $args \
diff --git a/Completion/BSD/Command/_fetch b/Completion/BSD/Command/_fetch
index ac1264bf8..eef5ffd96 100644
--- a/Completion/BSD/Command/_fetch
+++ b/Completion/BSD/Command/_fetch
@@ -23,7 +23,7 @@ _arguments -s -S \
'(-N --netrc)'{-N+,--netrc=}'[use file instead of ~/.netrc to look up login names and pass- words for FTP sites]' \
'(-n --no-mtime)'{-n,--no-mtime}"[don't preserve the modification time]" \
'--no-passive[force FTP code to use active mode]' \
- '--no-proxy=[hosts on which to disable proxoes]:host:_sequence _hosts' \
+ '--no-proxy=[hosts on which to disable proxies]:host:_sequence _hosts' \
'--no-sslv3' '--no-tlsv1' --no-verify-hostname --no-verify-peer \
'(-o --output)'{-o+,--output=}'[set the output file name]:file:_files' \
'-P' \
diff --git a/Completion/BSD/Command/_gstat b/Completion/BSD/Command/_gstat
index c60e54422..238defce4 100644
--- a/Completion/BSD/Command/_gstat
+++ b/Completion/BSD/Command/_gstat
@@ -5,6 +5,7 @@ _arguments -s : \
'(-B)-b[batch mode]' \
'(-b)-B[endless batch mode]' \
'-c[enable the display geom(4) consumers]' \
+ '(-b -B)-C[CSV output mode]' \
'-d[enable the display delete operations]' \
'-f+[filter by regex]:regex' \
'-o[enable the display for other operations]' \
diff --git a/Completion/BSD/Command/_mixerctl b/Completion/BSD/Command/_mixerctl
index a43aed4cb..d2a9ea3ee 100644
--- a/Completion/BSD/Command/_mixerctl
+++ b/Completion/BSD/Command/_mixerctl
@@ -8,4 +8,4 @@ _arguments -s -S -A "-*" \
'(-a -n -v)-q[Suppress all printing when setting a variable]' \
'(-a -n -v)-t[Attempt to select the next possible value of an enum]' \
'(-q -t)-v[Show all possible values of variables]' \
- '(-a)*:mixerctl varible:_multi_parts -i -S = -q . _cache_mixerctlvars'
+ '(-a)*:mixerctl variable:_multi_parts -i -S = -q . _cache_mixerctlvars'
diff --git a/Completion/BSD/Command/_pkgin b/Completion/BSD/Command/_pkgin
new file mode 100644
index 000000000..5cb12baea
--- /dev/null
+++ b/Completion/BSD/Command/_pkgin
@@ -0,0 +1,79 @@
+#compdef pkgin
+
+local curcontext="$curcontext" pkgin=$words[1] cmd ret=1
+local -a state state_descr line expl cmds short pkgs
+local -A opt_args
+
+_arguments -s -S -C \
+ '-c+[enable chrooting pkgin in the given repository]:chroot path:_directories' \
+ '-d[download only]' \
+ '-f[force database update]' \
+ '-F[force package reinstall]' \
+ '(- 1 *)-h[display usage information]' \
+ '-l+[only include the packages with the specified status flags]:limit chars:((
+ \=\:installed\ version\ is\ current
+ \<\:installed\ version\ is\ older
+ \>\:installed\ version\ is\ newer
+ ))' \
+ '(-y)-n[assume "no" as default answer and print results of actions to be taken line per line]' \
+ '-p[display results in a parsable format]' \
+ '-P[display packages versions instead of globs (sd, sfd, srd)]' \
+ '-t+[log package browsing (dependencies and impact) to specified log file]:log file:_files' \
+ '(- 1 *)-v[display version information]' \
+ '-V[be verbose when (un)installing]' \
+ '(-n)-y[assume "yes" as default answer, except for autoremove]' \
+ '1:command:->subcommands' \
+ '*:: :->restargs' && ret=0
+
+if [[ -n $state ]]; then
+ cmds=( ${${${(f)"$(_call_program commands $pkgin -h 2>&1)"}[3,-1]/ - (#b)(?)/:$match:l}%.} )
+ short=( ${${cmds#*\(}/ #\)/} )
+ cmds=( ${cmds// #\(*\)/} )
+ if [[ $state = subcommands && ! -prefix - ]]; then
+ _describe -t commands "command" short -- cmds -M 'r:|-=* r:|=*' && ret=0
+ return ret
+ fi
+
+ cmd=${short[(I)${words[1]}:*]}
+ if (( cmd )); then
+ cmd=${cmds[cmd]%%:*}
+ else
+ cmd=$words[1]
+ fi
+ curcontext="${curcontext%:*}-$cmd"
+ case $cmd in
+ avail|autoremove|clean|export|(full-|)upgrade|show(|-no)-keep|update)
+ _nothing
+ ;;
+ import)
+ _wanted files expl file _files && ret=0
+ ;;
+ install|pkg-(content|descr|build-defs)|provides|requires|show(|-full|-rev)-deps|show-pkg-category)
+ _wanted packages expl package compadd - \
+ ${${(f)"$(_call_program packages $pkgin avail)"}%%-[^- ]# *} && ret=0
+ ;;
+ keep)
+ _wanted packages expl package compadd - \
+ ${${(f)"$(_call_program packages $pkgin show-no-keep)"}%%-[^- ]# *} && ret=0
+ ;;
+ remove)
+ _wanted packages expl package compadd - \
+ ${${(f)"$(_call_program packages $pkgin list)"}%%-[^- ]# *} && ret=0
+ ;;
+ search)
+ _message -e patterns pattern
+ ;;
+ show-category)
+ _wanted -x categories expl category compadd - /usr/pkgsrc/*~*/CVS(N/:t) && ret=0
+ ;;
+ unkeep)
+ _wanted packages expl package compadd - \
+ ${${(f)"$(_call_program packages $pkgin show-keep)"}%%-[^- ]# *} && ret=0
+ ;;
+ *)
+ _default && ret=0
+ ;;
+ esac
+fi
+
+return ret
diff --git a/Completion/BSD/Command/_procstat b/Completion/BSD/Command/_procstat
index e16057635..a1708f6ac 100644
--- a/Completion/BSD/Command/_procstat
+++ b/Completion/BSD/Command/_procstat
@@ -6,8 +6,10 @@ _arguments -s -A "-*" -S \
'-e[show environment variables]' \
'-f[show file descriptor information]' \
'-i[show signal pending and disposition]' \
+ '-j[show signal pending and blocked information for process threads]' \
'-k[show stacks of kernel threads]' \
'-l[show resource limits]' \
+ "-L[show LWP info for the process pertaining to it's signal driven exit]" \
'-r[show resource usage]' \
'-s[show security credential information]' \
'-S[show cpuset information]' \
diff --git a/Completion/BSD/Command/_signify b/Completion/BSD/Command/_signify
index 26571aa2a..6a786e2e1 100644
--- a/Completion/BSD/Command/_signify
+++ b/Completion/BSD/Command/_signify
@@ -3,29 +3,30 @@
_arguments -s -S -A "-*" : \
- checksum \
'-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]' \
- '-x[signature file]:signature file:_files' \
+ '-x+[specify signature file]:signature file:_files' \
'*:file:_files' \
- generate \
'-G[generate a new key pair]' \
- '-c[specify comment]:comment:' \
- '-n[do not ask for passphrase]' \
- '-p[public key]:public key:_files' \
- '-s[secret key]:secret key:_files' \
+ '-c+[specify comment]:comment' \
+ "-n[don't ask for passphrase]" \
+ '-p+[specify public key file]:public key:_files' \
+ '-s+[specify secret key file]:secret key:_files' \
- sign \
'-S[sign a message and create a signature]' \
'-e[embed the message after the signature]' \
- '-m[file containing message]:message file:_files' \
- '-s[secret key]:secret key:_files' \
- '-x[signature file]:signature file:_files' \
+ '-n[store a zero time stamp in the gzip(1) header (with -z)]' \
+ '-m+[specify file containing message to sign]:message file:_files' \
+ '-s+[specify secret key file]:secret key:_files' \
+ '-x+[specify signature file]:signature file:_files' \
'-z[embed signature in gzip header]' \
- verify \
'-V[verify the message and signature match]' \
'-e[extract the message from the signature]' \
- '-m[file containing message to verify or destination to extract]:message file:_files' \
- '-p[public key]:public key:_files' \
+ '-m+[specify file containing message to verify or destination to extract]:message file:_files' \
+ '-p+[specify public key file]:public key:_files' \
'-q[quiet mode]' \
- '-t[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \
- '-x[signature file]:signature file:_files' \
+ '-t+[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \
+ '-x+[specify signature file]:signature file:_files' \
'-z[verify signature in gzip header]'
diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_sockstat
index 913f3eb05..1d7973db7 100644
--- a/Completion/BSD/Command/_sockstat
+++ b/Completion/BSD/Command/_sockstat
@@ -13,6 +13,14 @@ case $OSTYPE in
'-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*)
for proto in ${${(M)${(f)"$(</etc/protocols)"}##[a-z0-9]*}}; do
case $proto in
diff --git a/Completion/BSD/Command/_vmctl b/Completion/BSD/Command/_vmctl
index 66d9081b0..873bb5670 100644
--- a/Completion/BSD/Command/_vmctl
+++ b/Completion/BSD/Command/_vmctl
@@ -29,6 +29,7 @@ subcommands=(
start:'start a VM'
stop:'stop a VM'
unpause:'resume a VM'
+ wait:'wait until specified VM has stopped'
)
if (( CURRENT == 2 )); then
@@ -37,21 +38,18 @@ else
local curcontext="${curcontext%:*}-${words[2]}:"
shift words; (( CURRENT-- ))
case $words[1] in
- console|pause|send|show|status|unpause)
+ console|pause|send|show|status|unpause|wait)
_vm_names
;;
create)
- if (( CURRENT == 2 )); then
- compset -P '(raw|qcow2):' || alts=(
- 'prefixes:prefix:compadd -S: raw qcow2'
- )
- _alternative 'files:path:_files' $alts
- else
- shift words; (( CURRENT-- ))
- _arguments \
- '-s+[specify size]:size' \
- '-b+[specify base disk]:base image:_files'
- fi
+ compset -P '(raw|qcow2):' || alts=(
+ 'prefixes:prefix:compadd -S: raw qcow2'
+ )
+ _arguments \
+ '-s+[specify size]:size' \
+ '(-i)-b+[specify base disk]:base image:_files' \
+ '(-b)-i+[copy and convert input disk]:disk image:_files' \
+ '1:disk: _alternative "files:path:_files" $alts'
;;
load)
_arguments ':configuration file:_files'
@@ -70,33 +68,28 @@ else
))'
;;
start)
- if (( CURRENT == 2 )); then
- _vm_names
- else
- shift words; (( CURRENT-- ))
- _arguments -s \
- '-b+[boot with the specified kernel or BIOS image]:boot image:_files' \
- '-c[automatically connect to the VM console]' \
- '*-d+[disk image file]:disk image:_files' \
- '-i+[number of network interfaces]:number: ' \
- '-L[add a local network interface]' \
- '-m+[memory size in megabytes]:megabytes: ' \
- '-n+[specify switch to attach]: :_vm_switches' \
- '-r+[ISO image file for virtual CD-ROM]:ISO image:_files' \
- '-t+[use existing VM as a template]: :_vm_names'
- fi
+ _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' \
+ '-c[automatically connect to the VM console]' \
+ '*-d+[disk image file]:disk image:_files' \
+ '-i+[number of network interfaces]:number: ' \
+ '-L[add a local network interface]' \
+ '-m+[specify memory size]:memory size (megabytes) [512]' \
+ '-n+[specify switch to attach]: :_vm_switches' \
+ '-r+[specify ISO image file for virtual CD-ROM]:ISO image:_files -g "*.iso(-.)"' \
+ '-t+[use existing VM as a template]: :_vm_names' \
+ '1: :_vm_names'
;;
stop)
- if (( CURRENT == 2 )); then
- _alternative \
- 'all:all:(-a)' \
- 'virtual-machines: :_vm_names'
- else
- shift words; (( CURRENT-- ))
- _arguments \
- '-f[forcefully stop without attempting a graceful shutdown]' \
- '-w[wait until the VM has been terminated]'
- fi
+ _arguments \
+ '(1)-a[stop all running VMs]' \
+ '-f[forcefully stop without attempting a graceful shutdown]' \
+ '-w[wait until the VM has been terminated]' \
+ '(-a)1: :_vm_names'
+ ;;
+ *)
+ _default
;;
esac
fi