From 22bca445f26e35ce54854d8a3641ca8b4d86d324 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Sun, 12 Apr 2015 21:00:58 +0200 Subject: [PATCH] Added modifyhd command --- README | 1 + VBoxManage | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README b/README index 3a8ab2e..4d1b359 100644 --- a/README +++ b/README @@ -28,6 +28,7 @@ Current version of script was written and tested against VBoxManage in version - import - list - metrics +- modifyhd - natnetwork - registervm - setextradata diff --git a/VBoxManage b/VBoxManage index ae93ecb..7fc96ea 100644 --- a/VBoxManage +++ b/VBoxManage @@ -7,7 +7,6 @@ # # [1] Sebastian T. Hafner # -# [ ] modifyhd # [ ] modifyvm _VBoxManage() { @@ -1177,6 +1176,23 @@ _VBoxManage() { ;; modifyhd) + if [[ ${prev} == ${cmd} ]]; then + _hdd_comp ${cur} + else + _find_item_name 2 + items=(--type --autoreset --property --compact --resize) + _get_excluded_items "${items[@]}" + COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) + case "${prev}" in + --type) + COMPREPLY=( $(compgen -W "normal writethrough immutable + shareable readonly multiattach" -- ${cur}) ) + ;; + --autoreset) + COMPREPLY=( $(compgen -W "on off" -- ${cur}) ) + ;; + esac + fi ;; modifyvm) ;;