mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 11:30:23 +01:00
Update clonemedium command
This commit is contained in:
38
VBoxManage
38
VBoxManage
@@ -563,35 +563,31 @@ _VBoxManage() {
|
|||||||
|
|
||||||
clonemedium)
|
clonemedium)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
_hdd_comp
|
||||||
|
_floppy_comp
|
||||||
|
_dvds_comp
|
||||||
|
elif [[ ${#COMP_WORDS[@]} -eq 4 ]]; then
|
||||||
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
else
|
else
|
||||||
|
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
disk)
|
--format)
|
||||||
_hdd_comp
|
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
dvd)
|
--variant)
|
||||||
_dvds_comp
|
COMPREPLY=( $(compgen -W "Standard Fixed Split2G Stream
|
||||||
;;
|
ESX" -- ${cur}) )
|
||||||
floppy)
|
|
||||||
_floppy_comp
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_find_item_name 2
|
items=( --existing --format --variant )
|
||||||
items=(--format --variant --existing)
|
[[ " ${COMP_WORDS[*]} " != *" disk "* &&
|
||||||
|
" ${COMP_WORDS[*]} " != *" dvd "* &&
|
||||||
|
" ${COMP_WORDS[*]} " != *" floppy "* ]] &&
|
||||||
|
items+=(disk dvd floppy)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
case "${prev}" in
|
;;
|
||||||
--format)
|
|
||||||
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" --\
|
|
||||||
${cur}) )
|
|
||||||
;;
|
|
||||||
--variant)
|
|
||||||
COMPREPLY=( $(compgen -W "Standard Fixed Split2G
|
|
||||||
Stream ESX" -- ${cur}) )
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user