From 5da82d54da22bb05051486b260a4756f6b8def72 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Fri, 17 Mar 2023 18:55:55 +0100 Subject: [PATCH] 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. --- VBoxManage | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/VBoxManage b/VBoxManage index 8988df4..8cc2663 100644 --- a/VBoxManage +++ b/VBoxManage @@ -1804,6 +1804,29 @@ _VBoxManage() { 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) items=(--basefolder --cloud --cloudbucket --cloudinstanceid --cloudprofile --controller --cpus --description --disk