mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 11:30:23 +01:00
Added createhd command
This commit is contained in:
7
README
7
README
@@ -1,10 +1,10 @@
|
|||||||
VBoxManage bash completion script.
|
VBoxManage bash completion script.
|
||||||
|
|
||||||
This version of the completion was initially based on Sebastian T. Hafner
|
This version of the completion was initially based on Sebastian T. Hafner
|
||||||
script. However, in some point of time I've decided to rewrite it almost from
|
script. However, in some point of time I've decided to rewrite it almost from
|
||||||
scratch.
|
scratch.
|
||||||
|
|
||||||
Current version of script was written and tested against VBoxManage in version
|
Current version of script was written and tested against VBoxManage in version
|
||||||
4.3.18, and supports commands:
|
4.3.18, and supports commands:
|
||||||
|
|
||||||
- adoptstate
|
- adoptstate
|
||||||
@@ -14,6 +14,7 @@ Current version of script was written and tested against VBoxManage in version
|
|||||||
- closemedium
|
- closemedium
|
||||||
- controlvm
|
- controlvm
|
||||||
- convertfromraw
|
- convertfromraw
|
||||||
|
- createhd
|
||||||
- list
|
- list
|
||||||
- showhdinfo
|
- showhdinfo
|
||||||
- showvminfo
|
- showvminfo
|
||||||
|
|||||||
29
VBoxManage
29
VBoxManage
@@ -15,7 +15,7 @@
|
|||||||
# [x] closemedium
|
# [x] closemedium
|
||||||
# [x] controlvm
|
# [x] controlvm
|
||||||
# [x] convertfromraw
|
# [x] convertfromraw
|
||||||
# [ ] createhd
|
# [x] createhd
|
||||||
# [ ] createvm
|
# [ ] createvm
|
||||||
# [ ] debugvm
|
# [ ] debugvm
|
||||||
# [ ] dhcpserver
|
# [ ] dhcpserver
|
||||||
@@ -553,6 +553,33 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
createhd)
|
createhd)
|
||||||
|
items=(--filename --size --sizebyte --diffparent --format --variant)
|
||||||
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
|
else
|
||||||
|
[[ " ${COMP_WORDS[@]} " == *" --size "* ||
|
||||||
|
" ${COMP_WORDS[@]} " == *" --sizebyte "* ]] &&
|
||||||
|
items=(--filename --diffparent --format --variant)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
|
case "${prev}" in
|
||||||
|
--filename)
|
||||||
|
COMPREPLY=( $(compgen -- ${cur}) )
|
||||||
|
;;
|
||||||
|
--diffparent)
|
||||||
|
COMPREPLY=()
|
||||||
|
_hdd_comp ${cur}
|
||||||
|
;;
|
||||||
|
--format)
|
||||||
|
COMPREPLY=( $(compgen -W "VDI VMDK VHD" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
--variant)
|
||||||
|
COMPREPLY=( $(compgen -W "Standard Fixed Split2G Stream
|
||||||
|
ESX" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
createvm)
|
createvm)
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user