Added export command

This commit is contained in:
2015-04-09 22:09:22 +02:00
parent 20e85255c1
commit 6c106fdba9
2 changed files with 28 additions and 1 deletions

1
README
View File

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

View File

@@ -7,7 +7,6 @@
#
# [1] Sebastian T. Hafner <sonix@own-hero.net>
#
# [ ] export
# [ ] extpack
# [ ] getextradata
# [ ] guestcontrol
@@ -764,6 +763,33 @@ _VBoxManage() {
_vms_state_comp ${cur}
;;
"export")
items=( --manifest --iso --options --vsys)
if [[ ${prev} == ${cmd} ]]; then
_vms_comp vms ${cur}
else
[[ " ${COMP_WORDS[@]} " != *" -o "* &&
" ${COMP_WORDS[@]} " != *" --output "* ]] &&
items+=(-o --output)
[[ " ${COMP_WORDS[@]} " != *" --legacy09 "* &&
" ${COMP_WORDS[@]} " != *" --ovf09 "* &&
" ${COMP_WORDS[@]} " != *" --ovf10 "* &&
" ${COMP_WORDS[@]} " != *" --ovf20 "* ]] &&
items+=(--legacy09 --ovf09 --ovf10 --ovf20)
[[ " ${COMP_WORDS[@]} " == *" --vsys "* ]] &&
items+=(--product --producturl --vendor --vendorurl
--version --description --eula --eulafile)
_get_excluded_items "${items[@]}"
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
case "${prev}" in
--options)
COMPREPLY=( $(compgen -W "manifest iso nomacs
nomacsbutnat" -- ${cur}) )
;;
esac
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
fi
;;
extpack)
;;