Update clonemedium command

This commit is contained in:
2023-03-19 17:13:36 +01:00
parent 350e0aedaf
commit f23ce2aedb

View File

@@ -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
;; ;;