Add set property completion

This commit is contained in:
Shohei YOSHIDA 2022-12-22 14:32:56 +09:00
parent b215131217
commit 021da0cde5
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 20 additions and 2 deletions

View File

@ -285,7 +285,10 @@ _virtualbox() {
# TODO
;;
(setproperty)
# TODO
_arguments \
'1: :(autostartdbpath defaultfrontend hwvirtexclusive launguage logginglevel loghistorycount machinefolder proxymode proxyurl vrdeauthlibrary vrdeextpack websrvauthlibrary)' \
'2:value:_vboxmanage_setproperty_value' \
&& ret=0
;;
(usbfilter)
# TODO
@ -450,13 +453,28 @@ _vboxmachines() {
_values 'machines' $machines
}
# List available os types
(( $+functions[_vboxostypes] )) ||
_vboxostypes() {
local -a os=(${(@f)"$(vboxmanage list ostypes | awk '/^ID:/{ print $2 }')"})
_values 'machines' $os
}
(( $+functions[_vboxmanage_setproperty_value] )) ||
_vboxmanage_setproperty_value() {
case $words[2] in
(autostartdbpath)
_arguments '*: :_files'
;;
(machinefolder)
_arguments '*: :_files -/'
;;
(proxymode)
local -a mode=(manual noproxy system)
_values 'proxymode' $mode
;;
esac
}
_virtualbox "$@"
# Local Variables: