Add usbdevsource subcommand completion

This commit is contained in:
Shohei YOSHIDA 2022-12-24 22:00:29 +09:00
parent bf30efa147
commit 2e02fa2bc4
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 27 additions and 1 deletions

View File

@ -321,7 +321,7 @@ _vboxmanage() {
# TODO
;;
(usbdevsource)
# TODO
_vboxmanage_usbdevsource && ret=0
;;
(extpack)
_vboxmanage_expack && ret=0
@ -966,6 +966,32 @@ _vboxmanage_guestproperty() {
return $ret
}
(( $+functions[_vboxmanage_usbdevsource] )) ||
_vboxmanage_usbdevsource() {
local ret=1
_arguments -C \
'1: :(add remove)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
case $words[1] in
(add)
_arguments \
'--address=[Specifies the address of the USB backend]:address' \
'--backend=[Specifies the USB proxy service backend to use]:backend' \
'*: :_files' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_vboxmanage_expack] )) ||
_vboxmanage_expack() {
local ret=1