Merge pull request #962 from zsh-users/add-bandwidthctl
Add bandwidthctl subcommand completion
This commit is contained in:
commit
317a63bc03
|
@ -218,7 +218,7 @@ _vboxmanage() {
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(bandwidthctl)
|
(bandwidthctl)
|
||||||
# TODO
|
_vboxmanage_bandwidthctl
|
||||||
;;
|
;;
|
||||||
(showmediuminfo)
|
(showmediuminfo)
|
||||||
_arguments \
|
_arguments \
|
||||||
|
@ -455,6 +455,50 @@ _vboxmanage_encryptvm_addpassword() {
|
||||||
'--new-password-id[specify the new ID for the password for encryption of the VM]:id'
|
'--new-password-id[specify the new ID for the password for encryption of the VM]:id'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(( $+functions[_vboxmanage_bandwidthctl] )) ||
|
||||||
|
_vboxmanage_bandwidthctl() {
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'1: :_vboxmachines' \
|
||||||
|
'2: :(add list remove set)' \
|
||||||
|
'*:: :->arg' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(arg)
|
||||||
|
local subcommand=$words[2]
|
||||||
|
if (( $+functions[_vboxmanage_bandwidthctl_${subcommand}] )); then
|
||||||
|
compset -n 2
|
||||||
|
_vboxmanage_bandwidthctl_${subcommand} && ret=0
|
||||||
|
else
|
||||||
|
_arguments '*: :_files' && ret=0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_vboxmanage_bandwidthctl_add] )) ||
|
||||||
|
_vboxmanage_bandwidthctl_add() {
|
||||||
|
_arguments \
|
||||||
|
'--limit=[Specifies the bandwidth limit for a bandwidth group]:limit' \
|
||||||
|
'--type=[Specifies the type of the bandwidth group]: :(disk network)'
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_vboxmanage_bandwidthctl_list] )) ||
|
||||||
|
_vboxmanage_bandwidthctl_list() {
|
||||||
|
_arguments \
|
||||||
|
'--machinereadable[Outputs the information about the bandwidth groups in name-value pairs]'
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_vboxmanage_bandwidthctl_set] )) ||
|
||||||
|
_vboxmanage_bandwidthctl_set() {
|
||||||
|
_arguments \
|
||||||
|
'--limit=[Specifies the bandwidth limit for a bandwidth group]:limit'
|
||||||
|
}
|
||||||
|
|
||||||
(( $+functions[_vboxheadless] )) ||
|
(( $+functions[_vboxheadless] )) ||
|
||||||
_vboxheadless() {
|
_vboxheadless() {
|
||||||
local ret=1
|
local ret=1
|
||||||
|
|
Loading…
Reference in New Issue