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:
36
VBoxManage
36
VBoxManage
@@ -563,34 +563,30 @@ _VBoxManage() {
|
||||
|
||||
clonemedium)
|
||||
if [[ ${prev} == ${cmd} ]]; then
|
||||
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||
else
|
||||
case "${prev}" in
|
||||
disk)
|
||||
_hdd_comp
|
||||
;;
|
||||
dvd)
|
||||
_dvds_comp
|
||||
;;
|
||||
floppy)
|
||||
_floppy_comp
|
||||
;;
|
||||
*)
|
||||
_find_item_name 2
|
||||
items=(--format --variant --existing)
|
||||
_get_excluded_items "${items[@]}"
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
_dvds_comp
|
||||
elif [[ ${#COMP_WORDS[@]} -eq 4 ]]; then
|
||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||
else
|
||||
|
||||
case "${prev}" in
|
||||
--format)
|
||||
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" --\
|
||||
${cur}) )
|
||||
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" -- ${cur}) )
|
||||
;;
|
||||
--variant)
|
||||
COMPREPLY=( $(compgen -W "Standard Fixed Split2G
|
||||
Stream ESX" -- ${cur}) )
|
||||
COMPREPLY=( $(compgen -W "Standard Fixed Split2G Stream
|
||||
ESX" -- ${cur}) )
|
||||
;;
|
||||
esac
|
||||
*)
|
||||
items=( --existing --format --variant )
|
||||
[[ " ${COMP_WORDS[*]} " != *" disk "* &&
|
||||
" ${COMP_WORDS[*]} " != *" dvd "* &&
|
||||
" ${COMP_WORDS[*]} " != *" floppy "* ]] &&
|
||||
items+=(disk dvd floppy)
|
||||
_get_excluded_items "${items[@]}"
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user