mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 11:30:23 +01:00
Bump to VirtualBox 5.0.18
This commit is contained in:
448
VBoxManage
448
VBoxManage
@@ -399,6 +399,24 @@ _VBoxManage() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# search for the word before current one, and try to match apropriate item
|
||||||
|
# to be displayed
|
||||||
|
# for example:
|
||||||
|
# foo bar disk baz
|
||||||
|
# will search for word disk.
|
||||||
|
_get_medium () {
|
||||||
|
case "${COMP_WORDS[COMP_CWORD-2]}" in
|
||||||
|
disk)
|
||||||
|
_hdd_comp
|
||||||
|
;;
|
||||||
|
dvd)
|
||||||
|
_dvds_comp
|
||||||
|
;;
|
||||||
|
floppy)
|
||||||
|
_floppy_comp
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//|/} # remove pipe from comp word breaks
|
COMP_WORDBREAKS=${COMP_WORDBREAKS//|/} # remove pipe from comp word breaks
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
@@ -432,6 +450,7 @@ _VBoxManage() {
|
|||||||
[[ -z "${name}" ]] &&
|
[[ -z "${name}" ]] &&
|
||||||
_vms_state_comp
|
_vms_state_comp
|
||||||
;;
|
;;
|
||||||
|
|
||||||
bandwidthctl)
|
bandwidthctl)
|
||||||
local items=(add set remove list)
|
local items=(add set remove list)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
@@ -478,10 +497,29 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
clonehd)
|
checkmediumpwd)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_hdd_comp
|
_hdd_comp
|
||||||
|
_floppy_comp
|
||||||
|
_dvds_comp
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
clonemedium)
|
||||||
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
else
|
else
|
||||||
|
case "${prev}" in
|
||||||
|
disk)
|
||||||
|
_hdd_comp
|
||||||
|
;;
|
||||||
|
dvd)
|
||||||
|
_dvds_comp
|
||||||
|
;;
|
||||||
|
floppy)
|
||||||
|
_floppy_comp
|
||||||
|
;;
|
||||||
|
*)
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
items=(--format --variant --existing)
|
items=(--format --variant --existing)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
@@ -489,15 +527,19 @@ _VBoxManage() {
|
|||||||
|
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
--format)
|
--format)
|
||||||
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "VDI VMDK VHD RAW" --\
|
||||||
|
${cur}) )
|
||||||
;;
|
;;
|
||||||
--variant)
|
--variant)
|
||||||
COMPREPLY=( $(compgen -W "Standard Fixed Split2G Stream
|
COMPREPLY=( $(compgen -W "Standard Fixed Split2G
|
||||||
ESX" -- ${cur}) )
|
Stream ESX" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
clonevm)
|
clonevm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
@@ -530,6 +572,7 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
closemedium)
|
closemedium)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
@@ -555,12 +598,13 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
controlvm)
|
controlvm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp runningvms
|
_vms_comp runningvms
|
||||||
else
|
else
|
||||||
local items=(acpipowerbutton acpisleepbutton clipboard
|
local items=(acpipowerbutton acpisleepbutton clipboard
|
||||||
cpuexecutioncap draganddrop guestmemoryballoon usbattach
|
cpuexecutioncap draganddrop guestmemoryballoon
|
||||||
keyboardputscancode natpf1 nic1 nicpromisc1 nicproperty1
|
keyboardputscancode natpf1 nic1 nicpromisc1 nicproperty1
|
||||||
nictrace1 nictracefile1 natpf2 nic2 nicpromisc2 nicproperty2
|
nictrace1 nictracefile1 natpf2 nic2 nicpromisc2 nicproperty2
|
||||||
nictrace2 nictracefile2 natpf3 nic3 nicpromisc3 nicproperty3
|
nictrace2 nictracefile2 natpf3 nic3 nicpromisc3 nicproperty3
|
||||||
@@ -674,6 +718,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
convertfromraw)
|
convertfromraw)
|
||||||
local items=(--format --variant --uuid)
|
local items=(--format --variant --uuid)
|
||||||
|
|
||||||
@@ -693,11 +738,17 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
createhd)
|
|
||||||
|
createmedium)
|
||||||
items=(--filename --size --sizebyte --diffparent --format --variant)
|
items=(--filename --size --sizebyte --diffparent --format --variant)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
else
|
else
|
||||||
|
case "${prev}" in
|
||||||
|
disk|dvd|floppy)
|
||||||
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
[[ " ${COMP_WORDS[@]} " == *" --size "* ||
|
[[ " ${COMP_WORDS[@]} " == *" --size "* ||
|
||||||
" ${COMP_WORDS[@]} " == *" --sizebyte "* ]] &&
|
" ${COMP_WORDS[@]} " == *" --sizebyte "* ]] &&
|
||||||
items=(--filename --diffparent --format --variant)
|
items=(--filename --diffparent --format --variant)
|
||||||
@@ -713,15 +764,19 @@ _VBoxManage() {
|
|||||||
_hdd_comp
|
_hdd_comp
|
||||||
;;
|
;;
|
||||||
--format)
|
--format)
|
||||||
COMPREPLY=( $(compgen -W "VDI VMDK VHD" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "VDI VMDK VHD" --\
|
||||||
|
${cur}) )
|
||||||
;;
|
;;
|
||||||
--variant)
|
--variant)
|
||||||
COMPREPLY=( $(compgen -W "Standard Fixed Split2G Stream
|
COMPREPLY=( $(compgen -W "Standard Fixed Split2G
|
||||||
ESX" -- ${cur}) )
|
Stream ESX" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
createvm)
|
createvm)
|
||||||
items=(--name --groups --ostype --register --basefolder --uuid)
|
items=(--name --groups --ostype --register --basefolder --uuid)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
@@ -749,9 +804,10 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
debugvm)
|
debugvm)
|
||||||
items=(dumpguestcore info injectnmi log logdest logflags osdetect
|
items=(dumpguestcore info injectnmi log logdest logflags osdetect
|
||||||
osinfo getregisters setregisters show statistics)
|
osinfo osdmesg getregisters setregisters show statistics)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp runningvms
|
_vms_comp runningvms
|
||||||
else
|
else
|
||||||
@@ -783,6 +839,14 @@ _VBoxManage() {
|
|||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
osdmesg)
|
||||||
|
items=()
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --lines "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -n "* ]] &&
|
||||||
|
items+=(--lines -n)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
_get_excluded_items "--descriptions"
|
_get_excluded_items "--descriptions"
|
||||||
COMPREPLY+=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY+=( $(compgen -W "$result" -- ${cur}) )
|
||||||
@@ -794,6 +858,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dhcpserver)
|
dhcpserver)
|
||||||
items=(add modify remove)
|
items=(add modify remove)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -838,12 +903,26 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
discardstate)
|
discardstate)
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
[[ -z "${name}" ]] &&
|
[[ -z "${name}" ]] &&
|
||||||
_vms_state_comp
|
_vms_state_comp
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
encryptmedium)
|
||||||
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
|
_hdd_comp
|
||||||
|
_floppy_comp
|
||||||
|
_dvds_comp
|
||||||
|
else
|
||||||
|
COMPREPLY=( $(compgen -W "--newpassword --oldpassword --cipher
|
||||||
|
--newpasswordid" -- ${cur}) )
|
||||||
|
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
"export")
|
"export")
|
||||||
items=( --manifest --iso --options --vsys)
|
items=( --manifest --iso --options --vsys)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
@@ -873,6 +952,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
extpack)
|
extpack)
|
||||||
items=(install uninstall cleanup)
|
items=(install uninstall cleanup)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -898,6 +978,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
getextradata)
|
getextradata)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "global" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "global" -- ${cur}) )
|
||||||
@@ -907,11 +988,13 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
guestcontrol)
|
guestcontrol)
|
||||||
local items=(execute copyfrom copyto cp createdir createdirectory
|
local items=(run start copyfrom copyto mkdir createdir
|
||||||
mkdir md removedir removedirectory rmdir removefile rm ren rename mv
|
createdirectory rmdir removedir removedirectory removefile rm mv
|
||||||
createtemp createtemporary mktemp list process pskill kill session
|
move ren rename mktemp createtemp createtemporary stat list
|
||||||
stat updateadditions watch)
|
closeprocess closesession updatega updateguestadditions
|
||||||
|
updateadditions watch)
|
||||||
|
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp runningvms
|
_vms_comp runningvms
|
||||||
@@ -920,81 +1003,213 @@ _VBoxManage() {
|
|||||||
subcommand=${COMP_WORDS[$((index+1))]}
|
subcommand=${COMP_WORDS[$((index+1))]}
|
||||||
if [[ " ${items[@]} " == *" $subcommand "* ]]; then
|
if [[ " ${items[@]} " == *" $subcommand "* ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
exec|execute)
|
run)
|
||||||
items=(--image --username --passwordfile --password
|
items=(--exe --timeout --unquoted-args
|
||||||
--domain --verbose --timeout --environment
|
--ignore-operhaned-processes --no-profile
|
||||||
--wait-exit --wait-stdout --wait-stderr --dos2unix
|
--dos2unix --unix2dos --username --domain --)
|
||||||
--unquoted-args --unix2dos)
|
|
||||||
|
|
||||||
[[ " ${COMP_WORDS[@]} " == *" --password "* ||
|
[[ " ${comp_words[@]} " != *" --password "* ||
|
||||||
" ${COMP_WORDS[@]} " == *" --passwordfile "* ]] &&
|
" ${comp_words[@]} " != *" --passwordfile "* ]] &&
|
||||||
items=(--image --username --domain --verbose
|
items+=(--passwordfile --password)
|
||||||
--timeout --environment --wait-exit --wait-stdout
|
[[ " ${COMP_WORDS[@]} " != *" --putenv "* &&
|
||||||
--wait-stderr --dos2unix --unquoted-args
|
" ${COMP_WORDS[@]} " != *" -E "* ]] &&
|
||||||
--unix2dos)
|
items+=(--putenv -E)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --no-wait-stdout "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" --wait-stdout "* ]] &&
|
||||||
|
items+=(--no-wait-stdout --wait-stdout)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --no-wait-stderr"* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" --wait-stderr "* ]] &&
|
||||||
|
items+=(--no-wait-stderr --wait-stderr)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
compreply=( $(compgen -w "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
|
start)
|
||||||
|
items=(--exe --timeout --unquoted-args
|
||||||
|
--ignore-operhaned-processes --no-profile
|
||||||
|
--username --domain --passwordfile --password --)
|
||||||
|
|
||||||
|
[[ " ${comp_words[@]} " != *" --password "* ||
|
||||||
|
" ${comp_words[@]} " != *" --passwordfile "* ]] &&
|
||||||
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
compreply=( $(compgen -w "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
|
copyfrom|copyto)
|
||||||
|
items=(--dryrun --follow --target-directory
|
||||||
|
--username --domain)
|
||||||
|
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --recursive "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -R "* ]] &&
|
||||||
|
items+=(--recursive -R)
|
||||||
|
[[ " ${comp_words[@]} " != *" --password "* ||
|
||||||
|
" ${comp_words[@]} " != *" --passwordfile "* ]] &&
|
||||||
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
copyfrom|copyto|cp)
|
|
||||||
items=(--username --passwordfile --password
|
createdirectory|createdir|mkdir)
|
||||||
--domain --verbose --dryrun --follow --recursive)
|
items=(--parents --mode --username --domain)
|
||||||
[[ " ${COMP_WORDS[@]} " == *" --password "* ||
|
[[ " ${COMP_WORDS[@]} " != *" --password "* ||
|
||||||
" ${COMP_WORDS[@]} " == *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
items=(--username --domain --verbose --dryrun
|
items+=(--passwordfile --password)
|
||||||
--follow --recursive)
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
_get_excluded_items "${items[@]}"
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
items+=(--verbose -v)
|
||||||
;;
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
createdirectory|createdir|mkdir|md)
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
items=(--username --passwordfile --password
|
items+=(--quiet -q)
|
||||||
--domain --verbose --parents --mode)
|
|
||||||
[[ " ${COMP_WORDS[@]} " == *" --password "* ||
|
|
||||||
" ${COMP_WORDS[@]} " == *" --passwordfile "* ]] &&
|
|
||||||
items=(--username --domain --verbose --parents
|
|
||||||
--mode)
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
removedir|removedirectory|rmdir)
|
removedir|removedirectory|rmdir)
|
||||||
items=(--username --domain --verbose)
|
items=(--username --domain)
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
items+=(--passwordfile --password)
|
items+=(--passwordfile --password)
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --recursive "* &&
|
[[ " ${COMP_WORDS[@]} " != *" --recursive "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" -R "* &&
|
" ${COMP_WORDS[@]} " != *" -R "* ]] &&
|
||||||
" ${COMP_WORDS[@]} " != *" -r "* ]] &&
|
items+=(--recursive -R)
|
||||||
items+=(--recursive -R -r)
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
removefile|rm|rename|ren|mv)
|
|
||||||
items=(--username --domain --verbose)
|
removefile|rm)
|
||||||
|
items=(--username --domain)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --force "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -f "* ]] &&
|
||||||
|
items+=(--force -f)
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
items+=(--passwordfile --password)
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
rename|ren|move|mv)
|
||||||
|
items=(--username --domain)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
createtemporary|createtemp|mktemp)
|
createtemporary|createtemp|mktemp)
|
||||||
items=(--username --domain --verbose --directory
|
items=(--username --domain --secure --tmpdir --mode)
|
||||||
--secure --tmpdir --mode)
|
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
items+=(--passwordfile --password)
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list)
|
list)
|
||||||
items=(--verbose)
|
items=()
|
||||||
[[ " ${COMP_WORDS[@]} " != *" all "* &&
|
[[ " ${COMP_WORDS[@]} " != *" all "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" sessions "* &&
|
" ${COMP_WORDS[@]} " != *" sessions "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" processes "* &&
|
" ${COMP_WORDS[@]} " != *" processes "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" files "* ]] &&
|
" ${COMP_WORDS[@]} " != *" files "* ]] &&
|
||||||
items+=(all sessions processes files)
|
items+=(all sessions processes files)
|
||||||
|
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
closeprocess)
|
||||||
|
items=()
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --session-id "* ]] &&
|
||||||
|
items+=(--session-name)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --session-name "* ]] &&
|
||||||
|
items+=(--session-id)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
|
closesession)
|
||||||
|
items=()
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --session-id "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" --session-name "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" --all "* ]] &&
|
||||||
|
items+=(--session-id --session-name --all)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
process)
|
process)
|
||||||
if [[ " ${COMP_WORDS[@]} " == *" process kill "* ]];
|
if [[ " ${COMP_WORDS[@]} " == *" process kill "* ]];
|
||||||
then
|
then
|
||||||
@@ -1009,18 +1224,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
pskill|pkill|kill)
|
|
||||||
items=(--verbose)
|
|
||||||
[[ " ${COMP_WORDS[@]} " != *" --session-name "* &&
|
|
||||||
" ${COMP_WORDS[@]} " != *" --session-id "* ]] &&
|
|
||||||
items+=(--session-id --session-name)
|
|
||||||
_get_excluded_items "${items[@]}"
|
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
|
||||||
;;
|
|
||||||
session)
|
|
||||||
_get_excluded_items "close"
|
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
|
||||||
;;
|
|
||||||
stat)
|
stat)
|
||||||
if [[ "${cur}" == "stat" ]]; then
|
if [[ "${cur}" == "stat" ]]; then
|
||||||
COMPREPLY=( $(compgen -- ${cur}) )
|
COMPREPLY=( $(compgen -- ${cur}) )
|
||||||
@@ -1029,16 +1233,38 @@ _VBoxManage() {
|
|||||||
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
[[ " ${COMP_WORDS[@]} " != *" --password "* &&
|
||||||
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[@]} " != *" --passwordfile "* ]] &&
|
||||||
items+=(--passwordfile --password)
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
updateadditions)
|
updatega|updateguestadditions|updateadditions)
|
||||||
items=(--source --verbose --wait-start)
|
items=(--source --wait-start)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
watch)
|
watch)
|
||||||
|
items=()
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --verbose "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -v "* ]] &&
|
||||||
|
items+=(--verbose -v)
|
||||||
|
[[ " ${COMP_WORDS[@]} " != *" --quiet "* &&
|
||||||
|
" ${COMP_WORDS[@]} " != *" -q "* ]] &&
|
||||||
|
items+=(--quiet -q)
|
||||||
|
|
||||||
_get_excluded_items "--verbose"
|
_get_excluded_items "--verbose"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -1074,6 +1300,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
guestproperty)
|
guestproperty)
|
||||||
items=(get set delete unset enumerate wait)
|
items=(get set delete unset enumerate wait)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -1105,6 +1332,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
hostonlyif)
|
hostonlyif)
|
||||||
items=(ipconfig create remove)
|
items=(ipconfig create remove)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -1138,6 +1366,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
import)
|
import)
|
||||||
items=(--options)
|
items=(--options)
|
||||||
if [[ "${prev}" == "import" ]]; then
|
if [[ "${prev}" == "import" ]]; then
|
||||||
@@ -1160,6 +1389,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list)
|
list)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_list_comp ${cur}
|
_list_comp ${cur}
|
||||||
@@ -1174,6 +1404,22 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
mediumproperty)
|
||||||
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
|
else
|
||||||
|
case "${prev}" in
|
||||||
|
disk|dvd|floppy)
|
||||||
|
COMPREPLY=( $(compgen -W "get set delete" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
get|set|floppy)
|
||||||
|
_get_medium
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
metrics)
|
metrics)
|
||||||
items=(list setup query enable disable collect)
|
items=(list setup query enable disable collect)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -1230,25 +1476,41 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
modifyhd)
|
|
||||||
|
modifymedium)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_hdd_comp
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
else
|
else
|
||||||
|
case "${prev}" in
|
||||||
|
disk)
|
||||||
|
_hdd_comp
|
||||||
|
;;
|
||||||
|
dvd)
|
||||||
|
_dvds_comp
|
||||||
|
;;
|
||||||
|
floppy)
|
||||||
|
_floppy_comp
|
||||||
|
;;
|
||||||
|
*)
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
items=(--type --autoreset --property --compact --resize)
|
items=(--type --autoreset --property --compact --resize)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
--type)
|
--type)
|
||||||
COMPREPLY=( $(compgen -W "normal writethrough immutable
|
COMPREPLY=( $(compgen -W "normal writethrough
|
||||||
shareable readonly multiattach" -- ${cur}) )
|
immutable shareable readonly multiattach" --\
|
||||||
|
${cur}) )
|
||||||
;;
|
;;
|
||||||
--autoreset)
|
--autoreset)
|
||||||
COMPREPLY=( $(compgen -W "on off" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "on off" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
modifyvm)
|
modifyvm)
|
||||||
items=(--name --groups --description --ostype --iconfile --memory
|
items=(--name --groups --description --ostype --iconfile --memory
|
||||||
--pagefusion --vram --acpi --pciattach --pcidetach --ioapic --hpet
|
--pagefusion --vram --acpi --pciattach --pcidetach --ioapic --hpet
|
||||||
@@ -1318,7 +1580,7 @@ _VBoxManage() {
|
|||||||
--teleporterpassword --teleporterpasswordfile --tracing-enabled
|
--teleporterpassword --teleporterpasswordfile --tracing-enabled
|
||||||
--tracing-config --tracing-allow-vm-access --usbcardreader
|
--tracing-config --tracing-allow-vm-access --usbcardreader
|
||||||
--autostart-enabled --autostart-delay --videocap --videocapscreens
|
--autostart-enabled --autostart-delay --videocap --videocapscreens
|
||||||
--videocapfile --videocapres --vcpwidth --videocaprate --videocapfps
|
--videocapfile --videocapres --videocaprate --videocapfps
|
||||||
--videocapmaxtime --videocapmaxsize --videocapopts --defaultfrontend
|
--videocapmaxtime --videocapmaxsize --videocapopts --defaultfrontend
|
||||||
--cpuid-portability-level --paravirtprovider --audiocodec --usbxhci
|
--cpuid-portability-level --paravirtprovider --audiocodec --usbxhci
|
||||||
--usbrename)
|
--usbrename)
|
||||||
@@ -1488,6 +1750,7 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
natnetwork)
|
natnetwork)
|
||||||
items=(add remove modify start stop)
|
items=(add remove modify start stop)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -1518,6 +1781,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
registervm)
|
registervm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
bind 'set mark-directories on'
|
bind 'set mark-directories on'
|
||||||
@@ -1528,12 +1792,14 @@ _VBoxManage() {
|
|||||||
COMPREPLY[0]="${COMPREPLY[0]}/"
|
COMPREPLY[0]="${COMPREPLY[0]}/"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
setextradata)
|
setextradata)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "global" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "global" -- ${cur}) )
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
setproperty)
|
setproperty)
|
||||||
items=(machinefolder hwvirtexclusive vrdeauthlibrary
|
items=(machinefolder hwvirtexclusive vrdeauthlibrary
|
||||||
websrvauthlibrary vrdeextpack autostartdbpath loghistorycount
|
websrvauthlibrary vrdeextpack autostartdbpath loghistorycount
|
||||||
@@ -1567,6 +1833,7 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sharedfolder)
|
sharedfolder)
|
||||||
items=(add remove)
|
items=(add remove)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
@@ -1603,11 +1870,32 @@ _VBoxManage() {
|
|||||||
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
showhdinfo)
|
showmediuminfo)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "disk dvd floppy" -- ${cur}) )
|
||||||
_hdd_comp
|
_hdd_comp
|
||||||
|
_dvds_comp
|
||||||
|
_floppy_comp
|
||||||
|
else
|
||||||
|
case "${prev}" in
|
||||||
|
disk)
|
||||||
|
_hdd_comp
|
||||||
|
;;
|
||||||
|
dvd)
|
||||||
|
_dvds_comp
|
||||||
|
;;
|
||||||
|
floppy)
|
||||||
|
_floppy_comp
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
items=(--delete)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
showvminfo)
|
showvminfo)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
@@ -1626,6 +1914,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
snapshot)
|
snapshot)
|
||||||
items=(take delete restore restorecurrent edit list showvminfo)
|
items=(take delete restore restorecurrent edit list showvminfo)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
@@ -1669,6 +1958,7 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
startvm)
|
startvm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms 1
|
_vms_comp vms 1
|
||||||
@@ -1680,6 +1970,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
storageattach)
|
storageattach)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
@@ -1687,9 +1978,9 @@ _VBoxManage() {
|
|||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
local items=(--storagectl --port --device --type --medium --mtype
|
local items=(--storagectl --port --device --type --medium --mtype
|
||||||
--comment --setuuid --setparentuuid --passthrough --tempeject
|
--comment --setuuid --setparentuuid --passthrough --tempeject
|
||||||
--nonrotational --discard --bandwidthgroup --forceunmount
|
--nonrotational --discard --hotpluggable --bandwidthgroup
|
||||||
--server --target --tport --lun --encodedlun --username
|
--forceunmount --server --target --tport --lun --encodedlun
|
||||||
--password --initiator --intnet)
|
--username --password --initiator --intnet)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
@@ -1718,9 +2009,10 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
storagectl)
|
storagectl)
|
||||||
local items=(--name --add --controller --portcount --hostiocache
|
local items=(--name --add --controller --portcount --hostiocache
|
||||||
--bootable --remove)
|
--bootable --rename --remove)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
else
|
else
|
||||||
@@ -1741,6 +2033,7 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
unregistervm)
|
unregistervm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
@@ -1750,7 +2043,8 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
usbfilter)
|
|
||||||
|
usbfilte)
|
||||||
if [[ COMP_CWORD -ge 3 ]]; then
|
if [[ COMP_CWORD -ge 3 ]]; then
|
||||||
subcommand="${COMP_WORDS[2]}"
|
subcommand="${COMP_WORDS[2]}"
|
||||||
if [[ $subcommand == "${cmd}" ]]; then
|
if [[ $subcommand == "${cmd}" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user