Added extpack command

This commit is contained in:
2015-04-10 17:15:25 +02:00
parent 6c106fdba9
commit 06657ebff5
2 changed files with 24 additions and 1 deletions

1
README
View File

@@ -20,6 +20,7 @@ Current version of script was written and tested against VBoxManage in version
- dhcpserver
- discardstate
- export
- extpack
- list
- showhdinfo
- showvminfo

View File

@@ -7,7 +7,6 @@
#
# [1] Sebastian T. Hafner <sonix@own-hero.net>
#
# [ ] 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)
;;