From 06657ebff5f3ab1905f1b27484ae221154f4d0f3 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Fri, 10 Apr 2015 17:15:25 +0200 Subject: [PATCH] Added extpack command --- README | 1 + VBoxManage | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README b/README index a25e198..e9f18f2 100644 --- a/README +++ b/README @@ -20,6 +20,7 @@ Current version of script was written and tested against VBoxManage in version - dhcpserver - discardstate - export +- extpack - list - showhdinfo - showvminfo diff --git a/VBoxManage b/VBoxManage index 920f120..9a2b6ce 100644 --- a/VBoxManage +++ b/VBoxManage @@ -7,7 +7,6 @@ # # [1] Sebastian T. Hafner # -# [ ] extpack # [ ] getextradata # [ ] guestcontrol # [ ] guestproperty @@ -792,6 +791,29 @@ _VBoxManage() { fi ;; extpack) + items=(install uninstall cleanup) + subcommand=${COMP_WORDS[2]} + if [[ " ${items[@]} " == *" $subcommand "* ]]; then + case "${subcommand}" in + install) + _get_excluded_items "--replace" + COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) + ;; + uninstall) + _get_excluded_items "--force" + COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) + ;; + cleanup) + COMPREPLY=() + ;; + --replace) + COMPREPLY=() + ;; + esac + else + [[ ${#COMPREPLY[@]} -eq 0 ]] && \ + COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) ) + fi ;; getextradata) ;;