Added hostnet command.

Note, that even if in vboxmanage help there is such command, says
vboxmanage (v7.0.6 at time of writing) refuses to execute it. Perhaps
it's a subject to change in the future.
This commit is contained in:
2023-03-17 18:55:55 +01:00
parent d2c25f9805
commit 5da82d54da

View File

@@ -1804,6 +1804,29 @@ _VBoxManage() {
fi fi
;; ;;
hostonlynet)
if [[ ${prev} == ${cmd} ]]; then
COMPREPLY=( $(compgen -W "add modify remove" -- ${cur}) )
else
subcommand=${COMP_WORDS[2]}
if [[ " ${COMP_WORDS[*]} " != *" --name"* &&
" ${COMP_WORDS[*]} " != *" --id"* ]]; then
COMPREPLY=( $(compgen -W "--name --id" -- ${cur}) )
else
case "${subcommand}" in
add|modify)
items=( --netmask --lower-ip --upper-ip )
[[ " ${COMP_WORDS[*]} " != *" --enable "* &&
" ${COMP_WORDS[*]} " != *" --disable "* ]] &&
items+=( --enable --disable )
_get_excluded_items "${items[@]}"
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
;;
esac
fi
fi
;;
import) import)
items=(--basefolder --cloud --cloudbucket --cloudinstanceid items=(--basefolder --cloud --cloudbucket --cloudinstanceid
--cloudprofile --controller --cpus --description --disk --cloudprofile --controller --cpus --description --disk