diff --git a/README b/README index 0b41c63..a25e198 100644 --- a/README +++ b/README @@ -19,6 +19,7 @@ Current version of script was written and tested against VBoxManage in version - debugvm - dhcpserver - discardstate +- export - list - showhdinfo - showvminfo diff --git a/VBoxManage b/VBoxManage index f4bd9d5..920f120 100644 --- a/VBoxManage +++ b/VBoxManage @@ -7,7 +7,6 @@ # # [1] Sebastian T. Hafner # -# [ ] 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) ;;