mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2026-03-25 19:13:31 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dffdf72bb9 | |||
| 1cde7fc57d | |||
| c051a4ed9d | |||
|
|
593ec245e5 | ||
| e681abb354 | |||
| cd90fc60bd | |||
| 28553da42d | |||
| 3efab392c1 | |||
| b0352554bb | |||
|
|
95088850b6 | ||
| 3404afa441 | |||
| ab6d9f7cd9 | |||
| 3bb795a1e3 | |||
| 468a0a4c32 | |||
| 59ffe61fd6 |
@@ -6,7 +6,7 @@ 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
|
||||||
7.0.4, and should contain all commands and their options.
|
7.2.4, and should contain all commands and their options.
|
||||||
|
|
||||||
Unlike other attempts, I've tried to make the script context aware. See the
|
Unlike other attempts, I've tried to make the script context aware. See the
|
||||||
simple session with the VBoxManage command below, to have an idea how it works:
|
simple session with the VBoxManage command below, to have an idea how it works:
|
||||||
@@ -42,6 +42,7 @@ be:
|
|||||||
* ~/bash-completion.d/
|
* ~/bash-completion.d/
|
||||||
* /usr/local/etc/bash-completion.d/
|
* /usr/local/etc/bash-completion.d/
|
||||||
* /etc/bash_completion.d/
|
* /etc/bash_completion.d/
|
||||||
|
* ~/.local/share/bash-completion
|
||||||
* etc.
|
* etc.
|
||||||
|
|
||||||
It's also okay to copy it into some directory, and place proper line in
|
It's also okay to copy it into some directory, and place proper line in
|
||||||
|
|||||||
515
VBoxManage
515
VBoxManage
@@ -1,10 +1,9 @@
|
|||||||
# bash command-line completion for VBoxManage command
|
# bash command-line completion for VBoxManage command
|
||||||
#
|
#
|
||||||
# Author: Roman 'gryf' Dobosz <gryf73@gmail.com>
|
# Author: Roman 'gryf' Dobosz <gryf73@gmail.com>
|
||||||
# URL: https://bitbucket.org/gryf/vboxmanage-bash-completion
|
|
||||||
# URL: https://github.com/gryf/vboxmanage-bash-completion
|
# URL: https://github.com/gryf/vboxmanage-bash-completion
|
||||||
# License: 3-clause BSD-style license (see LICENSE file)
|
# License: 3-clause BSD-style license (see LICENSE file)
|
||||||
# Version: 7.0.4
|
# Version: 7.2.4
|
||||||
|
|
||||||
|
|
||||||
_VBoxManage() {
|
_VBoxManage() {
|
||||||
@@ -164,8 +163,8 @@ _VBoxManage() {
|
|||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
|
|
||||||
vms=$(VBoxManage list vms -l | \
|
vms=$(VBoxManage list vms -l | \
|
||||||
egrep '^Name|State' | \
|
grep -E '^Name|State' | \
|
||||||
egrep -B1 'State:\s+saved' | \
|
grep -E -B1 'State:\s+saved' | \
|
||||||
grep Name |$VBMC_SED 's/Name:\s\+//' | \
|
grep Name |$VBMC_SED 's/Name:\s\+//' | \
|
||||||
tr '\n' '|' | \
|
tr '\n' '|' | \
|
||||||
$VBMC_SED 's/|$//' | \
|
$VBMC_SED 's/|$//' | \
|
||||||
@@ -199,7 +198,7 @@ _VBoxManage() {
|
|||||||
local item
|
local item
|
||||||
|
|
||||||
list=$(VBoxManage list ostypes | \
|
list=$(VBoxManage list ostypes | \
|
||||||
egrep ^ID: | \
|
grep -E ^ID: | \
|
||||||
$VBMC_SED 's/ID:\s\+//' | \
|
$VBMC_SED 's/ID:\s\+//' | \
|
||||||
tr '\n' '|' | \
|
tr '\n' '|' | \
|
||||||
$VBMC_SED 's/|$//')
|
$VBMC_SED 's/|$//')
|
||||||
@@ -234,7 +233,7 @@ _VBoxManage() {
|
|||||||
local item
|
local item
|
||||||
|
|
||||||
list=$(VBoxManage list hostonlyifs | \
|
list=$(VBoxManage list hostonlyifs | \
|
||||||
egrep ^Name: | \
|
grep -E ^Name: | \
|
||||||
$VBMC_SED 's/Name:\s\+//' | \
|
$VBMC_SED 's/Name:\s\+//' | \
|
||||||
$VBMC_SED 's/\s/\\ /g'| \
|
$VBMC_SED 's/\s/\\ /g'| \
|
||||||
tr '\n' '|' | \
|
tr '\n' '|' | \
|
||||||
@@ -330,6 +329,9 @@ _VBoxManage() {
|
|||||||
list=$(VBoxManage list | $VBMC_SED -e '1,2d' \
|
list=$(VBoxManage list | $VBMC_SED -e '1,2d' \
|
||||||
-e 's/VBoxManage list //' \
|
-e 's/VBoxManage list //' \
|
||||||
-e 's/[\[\]\|]/ /g' \
|
-e 's/[\[\]\|]/ /g' \
|
||||||
|
-e 's/ arm/ /g' \
|
||||||
|
-e 's/ x86 / /g' \
|
||||||
|
-e 's/platform-arch=/platform-arch/g' \
|
||||||
-e 's/|/ /g'|xargs echo)
|
-e 's/|/ /g'|xargs echo)
|
||||||
COMPREPLY=( $(compgen -W "$list" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$list" -- ${cur}) )
|
||||||
}
|
}
|
||||||
@@ -377,7 +379,7 @@ _VBoxManage() {
|
|||||||
local item
|
local item
|
||||||
|
|
||||||
list=$(VBoxManage list bridgedifs | \
|
list=$(VBoxManage list bridgedifs | \
|
||||||
egrep ^Name: | \
|
grep -E ^Name: | \
|
||||||
$VBMC_SED 's/Name:\s\+//' | \
|
$VBMC_SED 's/Name:\s\+//' | \
|
||||||
$VBMC_SED 's/\s/\\ /g'| \
|
$VBMC_SED 's/\s/\\ /g'| \
|
||||||
tr '\n' '|' | \
|
tr '\n' '|' | \
|
||||||
@@ -395,7 +397,7 @@ _VBoxManage() {
|
|||||||
local item
|
local item
|
||||||
|
|
||||||
list=$(VBoxManage list intnets| \
|
list=$(VBoxManage list intnets| \
|
||||||
egrep ^Name: | \
|
grep -E ^Name: | \
|
||||||
$VBMC_SED 's/Name:\s\+//' | \
|
$VBMC_SED 's/Name:\s\+//' | \
|
||||||
$VBMC_SED 's/\s/\\ /g'| \
|
$VBMC_SED 's/\s/\\ /g'| \
|
||||||
tr '\n' '|' | \
|
tr '\n' '|' | \
|
||||||
@@ -472,6 +474,24 @@ _VBoxManage() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_iface_comp() {
|
||||||
|
local ifaces
|
||||||
|
local item
|
||||||
|
ifaces=$(VBoxManage objtracker ifaces | \
|
||||||
|
grep -v "Supported interfaces:" | \
|
||||||
|
$VBMC_SED 's/^\s\+//g' | \
|
||||||
|
$VBMC_SED 's/\s\+$//g' | \
|
||||||
|
tr '\n' '|' | \
|
||||||
|
$VBMC_SED 's/|$//')
|
||||||
|
IFS='|' read -ra ifaces <<< "$ifaces"
|
||||||
|
|
||||||
|
for item in "${ifaces[@]}"
|
||||||
|
do
|
||||||
|
[[ ${item^^} == ${cur^^}* ]] && COMPREPLY+=("$item")
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//|/} # remove pipe from comp word breaks
|
COMP_WORDBREAKS=${COMP_WORDBREAKS//|/} # remove pipe from comp word breaks
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
@@ -677,11 +697,12 @@ _VBoxManage() {
|
|||||||
_cloudprofiles_comp
|
_cloudprofiles_comp
|
||||||
;;
|
;;
|
||||||
list)
|
list)
|
||||||
COMPREPLY=( $(compgen -W "instances images" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "instances images vnicattachments"
|
||||||
|
-- ${cur}) )
|
||||||
;;
|
;;
|
||||||
instance)
|
instance)
|
||||||
COMPREPLY=( $(compgen -W "create info terminate start
|
COMPREPLY=( $(compgen -W "clone create info metricdata
|
||||||
pause" -- ${cur}) )
|
metriclist terminate start pause reset" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
image)
|
image)
|
||||||
COMPREPLY=( $(compgen -W "create info delete import
|
COMPREPLY=( $(compgen -W "create info delete import
|
||||||
@@ -692,6 +713,13 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "setup create" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "setup create" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
reset)
|
||||||
|
COMPREPLY=( $(compgen -W "--id" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
vnicattachments)
|
||||||
|
COMPREPLY=( $(compgen -W "--compartment-id --filter"
|
||||||
|
-- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if [[ " ${COMP_WORDS[*]} " == *" list images"* ||
|
if [[ " ${COMP_WORDS[*]} " == *" list images"* ||
|
||||||
" ${COMP_WORDS[*]} " == *" list instances"* ]]; then
|
" ${COMP_WORDS[*]} " == *" list instances"* ]]; then
|
||||||
@@ -700,6 +728,18 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ " ${COMP_WORDS[*]} " == *" instance clone"* ]]; then
|
||||||
|
items=(--id --clone-name)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ " ${COMP_WORDS[*]} " == *" instance metricdata"* ]]; then
|
||||||
|
items=(--id --metric-name --metric-points)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ " ${COMP_WORDS[*]} " == *" instance create"* ]]; then
|
if [[ " ${COMP_WORDS[*]} " == *" instance create"* ]]; then
|
||||||
items=( --domain-name --display-name --shape --subnet
|
items=( --domain-name --display-name --shape --subnet
|
||||||
--publicip --boot-disk-size --privateip --public-ssh-key
|
--publicip --boot-disk-size --privateip --public-ssh-key
|
||||||
@@ -722,6 +762,7 @@ _VBoxManage() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [[ " ${COMP_WORDS[*]} " == *" instance info"* ||
|
if [[ " ${COMP_WORDS[*]} " == *" instance info"* ||
|
||||||
|
" ${COMP_WORDS[*]} " == *" instance metriclist"* ||
|
||||||
" ${COMP_WORDS[*]} " == *" instance terminate"* ||
|
" ${COMP_WORDS[*]} " == *" instance terminate"* ||
|
||||||
" ${COMP_WORDS[*]} " == *" instance start"* ||
|
" ${COMP_WORDS[*]} " == *" instance start"* ||
|
||||||
" ${COMP_WORDS[*]} " == *" instance pause"* ]]; then
|
" ${COMP_WORDS[*]} " == *" instance pause"* ]]; then
|
||||||
@@ -814,28 +855,26 @@ _VBoxManage() {
|
|||||||
_vms_comp runningvms
|
_vms_comp runningvms
|
||||||
else
|
else
|
||||||
local items=( acpipowerbutton acpisleepbutton addencpassword
|
local items=( acpipowerbutton acpisleepbutton addencpassword
|
||||||
audioin audioout autostart-delayseconds autostart-enabled1
|
audioin audioout autostart-delay autostart-enabled1
|
||||||
autostart-enabled2 autostart-enabled3 autostart-enabled4
|
autostart-enabled2 autostart-enabled3 autostart-enabled4
|
||||||
changeuartmode1 changeuartmode2 clipboard cpuexecutioncap
|
changeuartmode1 changeuartmode2 clipboard cpuexecutioncap
|
||||||
draganddrop guestmemoryballoon keyboardputfile
|
draganddrop guestmemoryballoon keyboardputfile
|
||||||
keyboardputscancode keyboardputstring natpf1 natpf2 natpf3
|
keyboardputscancode keyboardputstring natpf1 natpf2 natpf3
|
||||||
natpf4 natpf5 natpf6 natpf7 natpf8 natpf9 natpf1delete
|
natpf4 natpf5 natpf6 natpf7 natpf8 natpf9 nic1 nic2 nic3 nic4
|
||||||
natpf2delete natpf3delete natpf4delete natpf5delete natpf6delete
|
nic5 nic6 nic7 nic8 nicpromisc1 nicpromisc2 nicpromisc3
|
||||||
natpf7delete natpf8delete nic1 nic2 nic3 nic4 nic5 nic6 nic7
|
nicpromisc4 nicpromisc5 nicpromisc6 nicpromisc7 nicpromisc8
|
||||||
nic8 nicpromisc1 nicpromisc2 nicpromisc3 nicpromisc4 nicpromisc5
|
nicproperty1 nicproperty2 nicproperty3 nicproperty4 nicproperty5
|
||||||
nicpromisc6 nicpromisc7 nicpromisc8 nicproperty1 nicproperty2
|
nicproperty6 nicproperty7 nicproperty8 nictrace1 nictrace2
|
||||||
nicproperty3 nicproperty4 nicproperty5 nicproperty6 nicproperty7
|
nictrace3 nictrace4 nictrace5 nictrace6 nictrace7 nictrace8
|
||||||
nicproperty8 nictrace1 nictrace2 nictrace3 nictrace4 nictrace5
|
nictracefile1 nictracefile2 nictracefile3 nictracefile4
|
||||||
nictrace6 nictrace7 nictrace8 nictracefile1 nictracefile2
|
nictracefile5 nictracefile6 nictracefile7 nictracefile8 pause
|
||||||
nictracefile3 nictracefile4 nictracefile5 nictracefile6
|
plugcpu poweroff reboot recording removeallencpasswords
|
||||||
nictracefile7 nictracefile8 pause plugcpu poweroff reboot
|
removeencpassword reset resume savestate screenshotpng
|
||||||
recording removeallencpasswords removeencpassword reset resume
|
setcredentials setlinkstate1 setlinkstate2 setlinkstate3
|
||||||
savestate screenshotpng setcredentials setlinkstate1
|
setlinkstate4 setlinkstate5 setlinkstate6 setlinkstate7
|
||||||
setlinkstate2 setlinkstate3 setlinkstate4 setlinkstate5
|
setlinkstate8 setscreenlayout setvideomodehint shutdown teleport
|
||||||
setlinkstate6 setlinkstate7 setlinkstate8 setscreenlayout
|
unplugcpu usbattach usbdetach vm-process-priority vrde vrdeport
|
||||||
setvideomodehint shutdown teleport unplugcpu usbattach usbdetach
|
vrdeproperty vrdevideochannelquality webcam )
|
||||||
vm-process-priority vrde vrdeport vrdeproperty
|
|
||||||
vrdevideochannelquality webcam )
|
|
||||||
|
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
subcommand=${COMP_WORDS[$((index+1))]}
|
subcommand=${COMP_WORDS[$((index+1))]}
|
||||||
@@ -882,8 +921,8 @@ _VBoxManage() {
|
|||||||
recording)
|
recording)
|
||||||
[[ ${prev} == "recording" ]] && \
|
[[ ${prev} == "recording" ]] && \
|
||||||
COMPREPLY=( $(compgen -W "filename maxfilesize
|
COMPREPLY=( $(compgen -W "filename maxfilesize
|
||||||
maxtime off on screens videofps videorate
|
maxtime off on opts screens start stop
|
||||||
videores" -- ${cur}) )
|
videofps videorate videores" -- ${cur}) )
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
screens)
|
screens)
|
||||||
COMPREPLY=( $(compgen -W "all none
|
COMPREPLY=( $(compgen -W "all none
|
||||||
@@ -932,9 +971,8 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
changeuartmode[1-2])
|
changeuartmode[1-2])
|
||||||
tmp=(disconnected serverpipe-name clientpipe-name
|
tmp=(disconnected server client tcpserver tcpclient
|
||||||
tcpserverport tcpclienthostname:port filefilename
|
file device-name)
|
||||||
device-name)
|
|
||||||
_get_excluded_items "${tmp[@]}"
|
_get_excluded_items "${tmp[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -1041,8 +1079,9 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
createvm)
|
createvm)
|
||||||
items=( --basefolder --ciphercipher --default --group --name --ostype
|
items=( --basefolder --cipher --default --groups --name --ostype
|
||||||
--password-idpassword-id --passwordfile --register --uuid )
|
--password-id --password --platform-architecture --register
|
||||||
|
--uuid )
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
else
|
else
|
||||||
@@ -1050,7 +1089,7 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
--group)
|
--groups)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
_group_comp
|
_group_comp
|
||||||
;;
|
;;
|
||||||
@@ -1061,9 +1100,12 @@ _VBoxManage() {
|
|||||||
--basefolder)
|
--basefolder)
|
||||||
COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
|
COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
--passwordfile)
|
--password)
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
--platform-architecture)
|
||||||
|
COMPREPLY=( $(compgen -W "x86 arm" -- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -1302,7 +1344,7 @@ _VBoxManage() {
|
|||||||
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
addpassword)
|
addpassword)
|
||||||
items=( --passwordfile --password-id )
|
items=( --password --password-id )
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -1313,15 +1355,15 @@ _VBoxManage() {
|
|||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
setencryption)
|
setencryption)
|
||||||
items=( --old-passwordfile --ciphercipher-identifier
|
items=( --old-password --cipher
|
||||||
--new-passwordfile --new-password-id --force )
|
--new-password --new-password-id --force )
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--new-passwordfile|--old-passwordfile|--passwordfile)
|
--new-password|--old-password|--password)
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -1417,8 +1459,8 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
guestcontrol)
|
guestcontrol)
|
||||||
local items=( run start copyfrom copyto mkdir rmdir rm mv mktemp
|
local items=( run start copyfrom copyto fsinfo mkdir mount rmdir rm
|
||||||
stat list closeprocess closesession updatega watch )
|
mv mktemp stat list closeprocess closesession updatega watch )
|
||||||
|
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp runningvms
|
_vms_comp runningvms
|
||||||
@@ -1428,7 +1470,7 @@ _VBoxManage() {
|
|||||||
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
run)
|
run)
|
||||||
items=( --domain --dos2unix --exe
|
items=( --arg0 --cwd --domain --dos2unix --exe
|
||||||
--ignore-operhaned-processes --profile --putenv
|
--ignore-operhaned-processes --profile --putenv
|
||||||
--quiet --timeout --unix2dos --unquoted-args
|
--quiet --timeout --unix2dos --unquoted-args
|
||||||
--username --verbose -- )
|
--username --verbose -- )
|
||||||
@@ -1448,9 +1490,10 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
start)
|
start)
|
||||||
items=( --domain --exe --ignore-orphaned-processes
|
items=( --arg0 --cwd --domain --exe
|
||||||
--profile --putenv --quiet --timeout
|
--ignore-orphaned-processes --profile --putenv
|
||||||
--unquoted-args --username --verbose -- )
|
--quiet --timeout --unquoted-args --username
|
||||||
|
--verbose -- )
|
||||||
|
|
||||||
[[ " ${COMP_WORDS[*]} " != *" --password "* ||
|
[[ " ${COMP_WORDS[*]} " != *" --password "* ||
|
||||||
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
||||||
@@ -1473,6 +1516,19 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
fsinfo)
|
||||||
|
items=( --domain --human-readable --total
|
||||||
|
--username )
|
||||||
|
[[ " ${COMP_WORDS[*]} " != *" --password "* ||
|
||||||
|
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
||||||
|
items+=(--passwordfile --password)
|
||||||
|
[[ " ${COMP_WORDS[*]} " != *" --quiet"* ||
|
||||||
|
" ${COMP_WORDS[*]} " != *" --verbose"* ]] &&
|
||||||
|
items+=( --quiet --verbose )
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
mkdir)
|
mkdir)
|
||||||
items=( --domain --mode --parents --quiet
|
items=( --domain --mode --parents --quiet
|
||||||
--username --verbose )
|
--username --verbose )
|
||||||
@@ -1484,6 +1540,16 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
mount)
|
||||||
|
items=( --username --verbose )
|
||||||
|
[[ " ${COMP_WORDS[*]} " != *" --password "* ||
|
||||||
|
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
||||||
|
items+=(--passwordfile --password)
|
||||||
|
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
rmdir)
|
rmdir)
|
||||||
items=( --domain --quiet --recursive --username
|
items=( --domain --quiet --recursive --username
|
||||||
--verbose )
|
--verbose )
|
||||||
@@ -1517,8 +1583,8 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
mktemp)
|
mktemp)
|
||||||
items=( --domain --mode --quiet --secure --tmpdir
|
items=( --directory --domain --mode --quiet --secure
|
||||||
--username --verbose )
|
--tmpdir --username --verbose )
|
||||||
[[ " ${COMP_WORDS[*]} " != *" --password "* &&
|
[[ " ${COMP_WORDS[*]} " != *" --password "* &&
|
||||||
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
" ${COMP_WORDS[*]} " != *" --passwordfile "* ]] &&
|
||||||
items+=(--passwordfile --password)
|
items+=(--passwordfile --password)
|
||||||
@@ -1604,6 +1670,9 @@ _VBoxManage() {
|
|||||||
--passwordfile)
|
--passwordfile)
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
--cwd)
|
||||||
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
||||||
@@ -1750,8 +1819,11 @@ _VBoxManage() {
|
|||||||
--long|-l)
|
--long|-l)
|
||||||
COMPREPLY=( $(compgen -W "-s --sorted" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "-s --sorted" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
--platform-arch)
|
||||||
|
COMPREPLY=( $(compgen -W "x86 arm" -- ${cur}) )
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=( $(compgen -W "-l --long -s --sorted" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "-l --long -s --sorted --platform-arch" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@@ -1873,7 +1945,7 @@ _VBoxManage() {
|
|||||||
*)
|
*)
|
||||||
_find_item_name 2
|
_find_item_name 2
|
||||||
items=( --autoreset --compact --description --move
|
items=( --autoreset --compact --description --move
|
||||||
--property --setlocation --type )
|
--property --property-file --setlocation --type )
|
||||||
[[ " ${COMP_WORDS[*]} " != *" --resize "* &&
|
[[ " ${COMP_WORDS[*]} " != *" --resize "* &&
|
||||||
" ${COMP_WORDS[*]} " != *" --resizebyte"* ]] &&
|
" ${COMP_WORDS[*]} " != *" --resizebyte"* ]] &&
|
||||||
items+=( --resizebyte --resize )
|
items+=( --resizebyte --resize )
|
||||||
@@ -1891,7 +1963,7 @@ _VBoxManage() {
|
|||||||
--move)
|
--move)
|
||||||
COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
|
COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
--setlocation)
|
--setlocation|--property-file)
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1902,7 +1974,7 @@ _VBoxManage() {
|
|||||||
|
|
||||||
modifynvram)
|
modifynvram)
|
||||||
items=( changevar deletevar enrollmssignatures enrollorclpk
|
items=( changevar deletevar enrollmssignatures enrollorclpk
|
||||||
enrollpk inituefivarstore listvars queryvar )
|
enrollpk enrollmok inituefivarstore listvars queryvar secureboot)
|
||||||
# _get_excluded_items "${items[@]}"
|
# _get_excluded_items "${items[@]}"
|
||||||
# COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
# COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
@@ -1923,6 +1995,15 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
enrollmok)
|
||||||
|
if [ "${prev}" = "--mok" ]; then
|
||||||
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
|
else
|
||||||
|
items=( --mok --owner-uuid )
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
fi
|
||||||
|
;;
|
||||||
queryvar|changevar)
|
queryvar|changevar)
|
||||||
if [ "${prev}" = "--filename" ]; then
|
if [ "${prev}" = "--filename" ]; then
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
@@ -1941,63 +2022,74 @@ _VBoxManage() {
|
|||||||
listvars)
|
listvars)
|
||||||
COMPREPLY=( )
|
COMPREPLY=( )
|
||||||
;;
|
;;
|
||||||
|
secureboot)
|
||||||
|
COMPREPLY=( $(compgen -W "--enable --disable" \
|
||||||
|
-- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
||||||
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
|
case "${prev}" in
|
||||||
|
--enable)
|
||||||
|
COMPREPLY=( )
|
||||||
|
;;
|
||||||
|
--disable)
|
||||||
|
COMPREPLY=( )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
modifyvm)
|
modifyvm)
|
||||||
items=( --accelerate-2d-video --accelerate-3d --acpi --apic --audio
|
items=(--accelerate-3d --acpi --apic --arm-gic-its --audio
|
||||||
--audio-codec --audio-controller --audio-in --audio-out
|
--audio-codec --audio-controller --audio-in --audio-out
|
||||||
--autostart-delay --autostart-enabled --bios-apic
|
--autostart-delay --autostart-enabled --boot1 --boot2 --boot3
|
||||||
--bios-bootm-enu --bios-logo-display-time --bios-logo-fade-in
|
--boot4 --bridge-adapter1 --bridge-adapter2 --bridge-adapter3
|
||||||
--bios-logo-fade-out --bios-logo-image-path --bios-pxe-debug
|
|
||||||
--bios-system-time-offset --boot1 --boot2 --boot3 --boot4
|
|
||||||
--bridge-adapter1 --bridge-adapter2 --bridge-adapter3
|
|
||||||
--bridge-adapter4 --bridge-adapter5 --bridge-adapter6
|
--bridge-adapter4 --bridge-adapter5 --bridge-adapter6
|
||||||
--bridge-adapter7 --bridge-adapter8 --cable-connected1
|
--bridge-adapter7 --bridge-adapter8 --cable-connected1
|
||||||
--cable-connected2 --cable-connected3 --cable-connected4
|
--cable-connected2 --cable-connected3 --cable-connected4
|
||||||
--cable-connected5 --cable-connected6 --cable-connected7
|
--cable-connected5 --cable-connected6 --cable-connected7
|
||||||
--cloud-network1 --cloud-network2 --cloud-network3
|
--cable-connected8 --chipset --clipboard-file-transfers
|
||||||
--cloud-network4 --cable-connected8 --chipset --clipboard-mode
|
--clipboard-mode --cloud-network1 --cloud-network2
|
||||||
--cpu-profile --cpu-execution-cap --cpu-hotplug
|
--cloud-network3 --cloud-network4 --cpu-execution-cap
|
||||||
--cpuid-portability-level --cpuid-remove --cpuid-set
|
--cpu-hotplug --cpu-profile --cpuid-portability-level
|
||||||
--cpuid-remove-all --cpus --default-frontend --description
|
--cpuid-remove --cpuid-remove-all --cpuid-set --cpus
|
||||||
--drag-and-drop --firmware --graphicscontroller --groups
|
--default-frontend --description --drag-and-drop --firmware
|
||||||
--guest-debug-address --guest-debug-io-provider
|
--firmware-apic --firmware-boot-menu
|
||||||
--guest-debug-port --guest-debug-provider --guest-memory-balloon
|
--firmware-logo-display-time --firmware-logo-fade-in
|
||||||
--hardware-uuid --host-only-adapter1 --host-only-adapter2
|
--firmware-logo-fade-out --firmware-logo-image-path
|
||||||
--host-only-adapter3 --host-only-adapter4 --host-only-adapter5
|
--firmware-pxe-debug --firmware-system-time-offset
|
||||||
--host-only-adapter6 --host-only-adapter7 --host-only-adapter8
|
--graphicscontroller --groups --guest-debug-address
|
||||||
--host-only-net1 --host-only-net2 --host-only-net3
|
--guest-debug-io-provider --guest-debug-port
|
||||||
--host-only-net4 --host-only-net5 --host-only-net6
|
--guest-debug-provider --guest-memory-balloon --hardware-uuid
|
||||||
--host-only-net7 --host-only-net8 --hpet --hwvirtex
|
--host-only-adapter1 --host-only-adapter2 --host-only-adapter3
|
||||||
--ibpb-on-vm-entry --ibpb-on-vm-exit --icon-file --intnet1
|
--host-only-adapter4 --host-only-adapter5 --host-only-adapter6
|
||||||
--intnet2 --intnet3 --intnet4 --intnet5 --intnet6 --intnet7
|
--host-only-adapter7 --host-only-adapter8 --host-only-net1
|
||||||
--intnet8 --ioapic --iommu --keyboard --l1d-flush-on-sched
|
--host-only-net2 --host-only-net3 --host-only-net4
|
||||||
--l1d-flush-on-vm-entry --large-pages --long-mode --lpt1
|
--host-only-net5 --host-only-net6 --host-only-net7
|
||||||
--lpt-mode1 --mac-address1 --mac-address2 --mac-address3
|
--host-only-net8 --hwvirtex --ibpb-on-vm-entry --ibpb-on-vm-exit
|
||||||
|
--icon-file --intnet1 --intnet2 --intnet3 --intnet4 --intnet5
|
||||||
|
--intnet6 --intnet7 --intnet8 --ioapic --iommu --keyboard
|
||||||
|
--l1d-flush-on-sched --l1d-flush-on-vm-entry --large-pages
|
||||||
|
--lpt-mode1 --lpt1 --mac-address1 --mac-address2 --mac-address3
|
||||||
--mac-address4 --mac-address5 --mac-address6 --mac-address7
|
--mac-address4 --mac-address5 --mac-address6 --mac-address7
|
||||||
--mac-address8 --mds-clear-on-sched --mds-clear-on-vm-entry
|
--mac-address8 --mds-clear-on-sched --mds-clear-on-vm-entry
|
||||||
--memory --monitor-count --mouse --name --nat-alias-mode1
|
--memory --monitor-count --mouse --name --nat-bind-ip1
|
||||||
--nat-alias-mode2 --nat-alias-mode3 --nat-alias-mode4
|
--nat-bind-ip2 --nat-bind-ip3 --nat-bind-ip4 --nat-bind-ip5
|
||||||
--nat-alias-mode5 --nat-alias-mode6 --nat-alias-mode7
|
--nat-bind-ip6 --nat-bind-ip7 --nat-bind-ip8
|
||||||
--nat-alias-mode8 --nat-bind-ip1 --nat-bind-ip2 --nat-bind-ip3
|
|
||||||
--nat-bind-ip4 --nat-bind-ip5 --nat-bind-ip6 --nat-bind-ip7
|
|
||||||
--nat-bind-ip8 --nat-dns-host-resolver1 --nat-dns-host-resolver2
|
|
||||||
--nat-dns-host-resolver3 --nat-dns-host-resolver4
|
|
||||||
--nat-dns-host-resolver5 --nat-dns-host-resolver6
|
|
||||||
--nat-dns-host-resolver7 --nat-dns-host-resolver8
|
|
||||||
--nat-dns-pass-domain1 --nat-dns-pass-domain2
|
--nat-dns-pass-domain1 --nat-dns-pass-domain2
|
||||||
--nat-dns-pass-domain3 --nat-dns-pass-domain4
|
--nat-dns-pass-domain3 --nat-dns-pass-domain4
|
||||||
--nat-dns-pass-domain5 --nat-dns-pass-domain6
|
--nat-dns-pass-domain5 --nat-dns-pass-domain6
|
||||||
--nat-dns-pass-domain7 --nat-dns-pass-domain8 --nat-dns-proxy1
|
--nat-dns-pass-domain7 --nat-dns-pass-domain8 --nat-enable-tftp1
|
||||||
--nat-dns-proxy2 --nat-dns-proxy3 --nat-dns-proxy4
|
--nat-enable-tftp2 --nat-enable-tftp3 --nat-enable-tftp4
|
||||||
--nat-dns-proxy5 --nat-dns-proxy6 --nat-dns-proxy7
|
--nat-enable-tftp5 --nat-enable-tftp6 --nat-enable-tftp7
|
||||||
--nat-dns-proxy8 --nat-localhostreachable1
|
--nat-enable-tftp8 --nat-forward-broadcast1
|
||||||
|
--nat-forward-broadcast2 --nat-forward-broadcast3
|
||||||
|
--nat-forward-broadcast4 --nat-forward-broadcast5
|
||||||
|
--nat-forward-broadcast6 --nat-forward-broadcast7
|
||||||
|
--nat-forward-broadcast8 --nat-localhostreachable1
|
||||||
--nat-localhostreachable2 --nat-localhostreachable3
|
--nat-localhostreachable2 --nat-localhostreachable3
|
||||||
--nat-localhostreachable4 --nat-localhostreachable5
|
--nat-localhostreachable4 --nat-localhostreachable5
|
||||||
--nat-localhostreachable6 --nat-localhostreachable7
|
--nat-localhostreachable6 --nat-localhostreachable7
|
||||||
@@ -2008,51 +2100,51 @@ _VBoxManage() {
|
|||||||
--nat-pf1 --nat-pf2 --nat-pf3 --nat-pf4 --nat-pf5 --nat-pf6
|
--nat-pf1 --nat-pf2 --nat-pf3 --nat-pf4 --nat-pf5 --nat-pf6
|
||||||
--nat-pf7 --nat-pf8 --nat-settings1 --nat-settings2
|
--nat-pf7 --nat-pf8 --nat-settings1 --nat-settings2
|
||||||
--nat-settings3 --nat-settings4 --nat-settings5 --nat-settings6
|
--nat-settings3 --nat-settings4 --nat-settings5 --nat-settings6
|
||||||
--nat-settings7 --nat-settings8 --nat-tftp-file1 --nat-tftp-file2
|
--nat-settings7 --nat-settings8 --nat-tftp-file1
|
||||||
--nat-tftp-file3 --nat-tftp-file4 --nat-tftp-file5
|
--nat-tftp-file2 --nat-tftp-file3 --nat-tftp-file4
|
||||||
--nat-tftp-file6 --nat-tftp-file7 --nat-tftp-file8
|
--nat-tftp-file5 --nat-tftp-file6 --nat-tftp-file7
|
||||||
--nat-tftp-prefix1 --nat-tftp-prefix2 --nat-tftp-prefix3
|
--nat-tftp-file8 --nat-tftp-prefix1 --nat-tftp-prefix2
|
||||||
--nat-tftp-prefix4 --nat-tftp-prefix5 --nat-tftp-prefix6
|
--nat-tftp-prefix3 --nat-tftp-prefix4 --nat-tftp-prefix5
|
||||||
--nat-tftp-prefix7 --nat-tftp-prefix8 --nat-tftp-server1
|
--nat-tftp-prefix6 --nat-tftp-prefix7 --nat-tftp-prefix8
|
||||||
--nat-tftp-server2 --nat-tftp-server3 --nat-tftp-server4
|
--nat-tftp-server1 --nat-tftp-server2 --nat-tftp-server3
|
||||||
--nat-tftp-server5 --nat-tftp-server6 --nat-tftp-server7
|
--nat-tftp-server4 --nat-tftp-server5 --nat-tftp-server6
|
||||||
--nat-tftp-server8 --nested-hw-virt --nested-paging --nic1 --nic2
|
--nat-tftp-server7 --nat-tftp-server8 --nested-hw-virt
|
||||||
--nic3 --nic4 --nic5 --nic6 --nic7 --nic8 --nic-bandwidth-group1
|
--nested-paging --nic-bandwidth-group1 --nic-boot-prio1
|
||||||
--nic-boot-prio1 --nic-generic-drv1 --nic-generic-drv2
|
--nic-generic-drv1 --nic-generic-drv2 --nic-generic-drv3
|
||||||
--nic-generic-drv3 --nic-generic-drv4 --nic-generic-drv5
|
--nic-generic-drv4 --nic-generic-drv5 --nic-generic-drv6
|
||||||
--nic-generic-drv6 --nic-generic-drv7 --nic-generic-drv8
|
--nic-generic-drv7 --nic-generic-drv8 --nic-promisc1
|
||||||
--nic-promisc1 --nic-promisc2 --nic-promisc3 --nic-promisc4
|
--nic-promisc2 --nic-promisc3 --nic-promisc4 --nic-promisc5
|
||||||
--nic-promisc5 --nic-promisc6 --nic-promisc7 --nic-promisc8
|
--nic-promisc6 --nic-promisc7 --nic-promisc8 --nic-property1
|
||||||
--nic-property1 --nic-property2 --nic-property3 --nic-property4
|
--nic-property2 --nic-property3 --nic-property4 --nic-property5
|
||||||
--nic-property5 --nic-property6 --nic-property7 --nic-property8
|
--nic-property6 --nic-property7 --nic-property8 --nic-speed1
|
||||||
--nic-speed1 --nic-speed2 --nic-speed3 --nic-speed4 --nic-speed5
|
--nic-speed2 --nic-speed3 --nic-speed4 --nic-speed5 --nic-speed6
|
||||||
--nic-speed6 --nic-speed7 --nic-speed8 --nic-trace1 --nic-trace2
|
--nic-speed7 --nic-speed8 --nic-trace-file1 --nic-trace-file2
|
||||||
--nic-trace3 --nic-trace4 --nic-trace5 --nic-trace6 --nic-trace7
|
|
||||||
--nic-trace8 --nic-trace-file1 --nic-trace-file2
|
|
||||||
--nic-trace-file3 --nic-trace-file4 --nic-trace-file5
|
--nic-trace-file3 --nic-trace-file4 --nic-trace-file5
|
||||||
--nic-trace-file6 --nic-trace-file7 --nic-trace-file8 --nic-type1
|
--nic-trace-file6 --nic-trace-file7 --nic-trace-file8
|
||||||
--nic-type2 --nic-type3 --nic-type4 --nic-type5 --nic-type6
|
--nic-trace1 --nic-trace2 --nic-trace3 --nic-trace4 --nic-trace5
|
||||||
--nic-type7 --nic-type8 --os-type --pae --page-fusion
|
--nic-trace6 --nic-trace7 --nic-trace8 --nic-type1 --nic-type2
|
||||||
--paravirt-debug --paravirt-provider --pci-attach --pci-detach
|
--nic-type3 --nic-type4 --nic-type5 --nic-type6 --nic-type7
|
||||||
--plug-cpu --recording --recording-file --recording-max-size
|
--nic-type8 --nic1 --nic2 --nic3 --nic4 --nic5 --nic6 --nic7
|
||||||
|
--nic8 --os-type --page-fusion --paravirt-debug
|
||||||
|
--paravirt-provider --pci-attach --pci-detach --plug-cpu
|
||||||
|
--recording --recording-file --recording-max-size
|
||||||
--recording-max-time --recording-opts --recording-screens
|
--recording-max-time --recording-opts --recording-screens
|
||||||
--recording-video-fps --recording-video-rate
|
--recording-video-fps --recording-video-rate
|
||||||
--recording-video-res --rtc-use-utc --snapshot-folder --spec-ctrl
|
--recording-video-res --rtc-use-utc --snapshot-folder
|
||||||
--system-uuid-le --teleporter --teleporter-address
|
--spec-ctrl --system-uuid-le --teleporter --teleporter-address
|
||||||
--teleporter-password --teleporter-password-file
|
--teleporter-password --teleporter-password-file
|
||||||
--teleporter-port --testing-cfg-dwordidx --testing-enabled
|
--teleporter-port --testing-cfg-dwordidx --testing-enabled
|
||||||
--testing-mmio --tpm-location --tpm-type
|
--testing-mmio --tpm-location --tpm-type
|
||||||
--tracing-allow-vm-access --tracing-config --tracing-enabled
|
--tracing-allow-vm-access --tracing-config --tracing-enabled
|
||||||
--triple-fault-reset --uart1 --uart2 --uart-mode1 --uart-mode2
|
--triple-fault-reset --uart-mode1 --uart-mode2 --uart-type1
|
||||||
--uart-type1 --uart-type2 --unplug-cpu --usb-card-reader
|
--uart-type2 --uart1 --uart2 --unplug-cpu --usb-card-reader
|
||||||
--usb-ehci --usb-ohci --usb-rename --usb-xhci
|
--usb-ehci --usb-ohci --usb-rename --usb-xhci
|
||||||
--virt-vmsave-vmload --vm-process-priority --vram --vrde
|
--virt-vmsave-vmload --vm-execution-engine --vm-process-priority
|
||||||
--vrde-address --vrde-auth-library --vrde-auth-type
|
--vram --vrde --vrde-address --vrde-auth-library
|
||||||
--vrde-extpack --vrde-multi-con --vrde-port --vrde-property
|
--vrde-auth-type --vrde-extpack --vrde-multi-con --vrde-port
|
||||||
--vrde-reuse-con --vrde-video-channel
|
--vrde-property --vrde-reuse-con --vrde-video-channel
|
||||||
--vrde-video-channel-quality --vtx-ux --vtx-vpid --x2apic )
|
--vrde-video-channel-quality --x86-hpet --x86-long-mode
|
||||||
|
--x86-pae --x86-vtx-ux --x86-vtx-vpid --x86-x2apic)
|
||||||
|
|
||||||
|
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
@@ -2070,30 +2162,36 @@ _VBoxManage() {
|
|||||||
_os_comp
|
_os_comp
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--accelerate-2d-video|--accelerate-3d|--acpi|--apic|\
|
--accelerate-3d|--acpi|--apic|--arm-gic-its|--audio-in|\
|
||||||
--audio-in|--audio-out|--autostart-enabled|\
|
--audio-out|--autostart-enabled|--cable-connected1|\
|
||||||
--bios-logo-fade-in|--bios-logo-fade-out|--bios-pxe-debug|\
|
--cable-connected2|--cable-connected3|--cable-connected4|\
|
||||||
--cable-connected1|--cable-connected2|--cable-connected3|\
|
--cable-connected5|--cable-connected6|--cable-connected7|\
|
||||||
--cable-connected4|--cable-connected5|--cable-connected6|\
|
--cable-connected8|--cpu-hotplug|--firmware-logo-fade-in|\
|
||||||
--cable-connected7|--cable-connected8|--cpu-hotplug|--hpet|\
|
--firmware-logo-fade-out|--firmware-pxe-debug|--hwvirtex|\
|
||||||
--hwvirtex|--ibpb-on-vm-entry|--ibpb-on-vm-exit|--ioapic|\
|
--ibpb-on-vm-entry|--ibpb-on-vm-exit|--ioapic|\
|
||||||
--l1d-flush-on-sched|--l1d-flush-on-vm-entry|--large-pages|\
|
--l1d-flush-on-sched|--l1d-flush-on-vm-entry|--large-pages|\
|
||||||
--long-mode|--mds-clear-on-sched|--mds-clear-on-vm-entry|\
|
--mds-clear-on-sched|--mds-clear-on-vm-entry|\
|
||||||
--nat-dns-host-resolver[1-8]|--nat-dns-pass-domain[1-8]|\
|
--nat-dns-pass-domain[1-8]|--nat-enable-tftp[1-8]|\
|
||||||
--nat-dns-proxy[1-8]|--nat-localhostreachable[1-8]|\
|
--nat-forward-broadcast[1-8]|--nat-localhostreachable[1-8]|\
|
||||||
--nested-hw-virt|--nested-paging|--nic-trace[1-8]|--pae|\
|
--nested-hw-virt|--nested-paging|--nic-trace[1-8]|\
|
||||||
--page-fusion|--recording|--rtc-use-utc|--spec-ctrl|\
|
--page-fusion|--recording|--rtc-use-utc|--spec-ctrl|\
|
||||||
--system-uuid-le|--teleporter|--testing-enabled|\
|
--system-uuid-le|--teleporter|--testing-enabled|\
|
||||||
--testing-mmio|--tracing-allow-vm-access|--tracing-enabled|\
|
--testing-mmio|--tracing-allow-vm-access|--tracing-enabled|\
|
||||||
--triple-fault-reset|--usb-card-reader|--usb-ehci|\
|
--triple-fault-reset|--usb-card-reader|--usb-ehci|\
|
||||||
--usb-ohci|--usb-xhci|--virt-vmsave-vmload|--vrde-multi-con|\
|
--usb-ohci|--usb-xhci|--virt-vmsave-vmload|--vrde|\
|
||||||
--vrde-reuse-con|--vrde-video-channel|--vrde|--vtx-ux|\
|
--vrde-multi-con|--vrde-reuse-con|--vrde-video-channel|\
|
||||||
--vtx-vpid|--x2apic)
|
--x86-hpet|--x86-long-mode|--x86-pae|--x86-vtx-ux|\
|
||||||
|
--x86-vtx-vpid|--x86-x2apic)
|
||||||
COMPREPLY=( $(compgen -W "on off" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "on off" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--clipboard-file-transfers)
|
||||||
|
COMPREPLY=( $(compgen -W "disabled enabled" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
--graphicscontroller)
|
--graphicscontroller)
|
||||||
COMPREPLY=( $(compgen -W "none vboxvga vmsvga vboxsvga" \
|
COMPREPLY=( $(compgen -W \
|
||||||
|
"none vboxvga vmsvga vboxsvga qemuramfb" \
|
||||||
-- ${cur}) )
|
-- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2103,10 +2201,10 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--chipset)
|
--chipset)
|
||||||
COMPREPLY=( $(compgen -W "ich9 piix3" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "ich9 piix3 armv8virtual" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--bios-boot-menu)
|
--firmware-boot-menu)
|
||||||
COMPREPLY=( $(compgen -W "disabled menuonly
|
COMPREPLY=( $(compgen -W "disabled menuonly
|
||||||
messageandmenu" -- ${cur}) )
|
messageandmenu" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2124,7 +2222,7 @@ _VBoxManage() {
|
|||||||
|
|
||||||
--nic-type[1-8])
|
--nic-type[1-8])
|
||||||
COMPREPLY=( $(compgen -W "Am79C970A Am79C973 82540EM
|
COMPREPLY=( $(compgen -W "Am79C970A Am79C973 82540EM
|
||||||
82543GC 82545EM virtio" -- ${cur}) )
|
82543GC 82545EM virtio usbnet" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--nic-promisc[1-8])
|
--nic-promisc[1-8])
|
||||||
@@ -2172,10 +2270,6 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "delete" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "delete" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--nat-alias-mode[1-8])
|
|
||||||
COMPREPLY=( $(compgen -W "default" -- ${cur}) )
|
|
||||||
;;
|
|
||||||
|
|
||||||
--macaddress[1-8])
|
--macaddress[1-8])
|
||||||
COMPREPLY=( $(compgen -W "auto" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "auto" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2194,9 +2288,9 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--uart-mode[1-2])
|
--uart-mode[1-2])
|
||||||
COMPREPLY=( $(compgen -W "disconnected serverpipe
|
COMPREPLY=( $(compgen -W "disconnected server
|
||||||
clientpipe tcpserverport tcpclienthostname:port
|
client tcpserver tcpclient
|
||||||
filefilename device-name" -- ${cur}) )
|
file device-name" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--uart-type[1-2])
|
--uart-type[1-2])
|
||||||
@@ -2249,13 +2343,13 @@ _VBoxManage() {
|
|||||||
-- ${cur}) )
|
-- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--bios-apic)
|
--firmware-apic)
|
||||||
COMPREPLY=( $(compgen -W "disabled apic x2apic" \
|
COMPREPLY=( $(compgen -W "disabled apic x2apic" \
|
||||||
-- ${cur}) )
|
-- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--teleporter-password-file|--icon-file|--recording-file|\
|
--teleporter-password-file|--icon-file|--recording-file|\
|
||||||
--bios-logo-image-path|--nic-trace-file[1-8]|\
|
--firmware-logo-image-path|--nic-trace-file[1-8]|\
|
||||||
--nat-tftp-file[1-8])
|
--nat-tftp-file[1-8])
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2265,6 +2359,12 @@ _VBoxManage() {
|
|||||||
-- ${cur}) )
|
-- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--vm-execution-engine)
|
||||||
|
COMPREPLY=( $(compgen -W \
|
||||||
|
"default hm hwvirt nem native-api interpreter recompiler" \
|
||||||
|
-- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
--recording-screens)
|
--recording-screens)
|
||||||
COMPREPLY=( $(compgen -W "all none" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "all none" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2368,6 +2468,27 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
objtracker)
|
||||||
|
items=(ifaces objlist objinfo)
|
||||||
|
case "${prev}" in
|
||||||
|
objlist)
|
||||||
|
items=(--ifacename)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
objinfo)
|
||||||
|
items=(--ifacename --id)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
--ifacename)
|
||||||
|
_iface_comp
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
[[ ${#COMPREPLY[@]} -eq 0 ]] && \
|
||||||
|
COMPREPLY=( $(compgen -W "${items[*]}" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
registervm)
|
registervm)
|
||||||
if [[ ${prev} == ${cmd} ]]; then
|
if [[ ${prev} == ${cmd} ]]; then
|
||||||
bind 'set mark-directories on'
|
bind 'set mark-directories on'
|
||||||
@@ -2377,10 +2498,10 @@ _VBoxManage() {
|
|||||||
[[ ${#COMPREPLY[@]} = 1 && "${COMPREPLY[0]}" != *".vbox" ]] && \
|
[[ ${#COMPREPLY[@]} = 1 && "${COMPREPLY[0]}" != *".vbox" ]] && \
|
||||||
COMPREPLY[0]="${COMPREPLY[0]}/"
|
COMPREPLY[0]="${COMPREPLY[0]}/"
|
||||||
else
|
else
|
||||||
if [[ $prev == "--passwordfile" ]]; then
|
if [[ $prev == "--password" ]]; then
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
else
|
else
|
||||||
local items=( --passwordfile )
|
local items=( --password )
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
@@ -2433,10 +2554,14 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
sharedfolder)
|
sharedfolder)
|
||||||
items=(add remove)
|
items=(add remove modify)
|
||||||
subcommand=${COMP_WORDS[2]}
|
subcommand=${COMP_WORDS[2]}
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
add|remove)
|
add|remove)
|
||||||
|
_vms_comp vms
|
||||||
|
COMPREPLY+=( "global" )
|
||||||
|
;;
|
||||||
|
modify)
|
||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
;;
|
;;
|
||||||
--hostpath)
|
--hostpath)
|
||||||
@@ -2448,12 +2573,23 @@ _VBoxManage() {
|
|||||||
_sharedfolder_comp "${name}"
|
_sharedfolder_comp "${name}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
--readonly)
|
||||||
|
COMPREPLY=( $(compgen -W "true false" -- ${cur}) )
|
||||||
|
;;
|
||||||
|
--auto-mount-point)
|
||||||
|
COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
|
||||||
|
;;
|
||||||
|
|
||||||
|
--symlink-policy)
|
||||||
|
COMPREPLY=( $(compgen -W "forbidden subtree relative
|
||||||
|
any" -- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
|
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
add)
|
add)
|
||||||
items=(--name --hostpath --transient --readonly
|
items=(--name --hostpath --transient --readonly
|
||||||
--automount --auto-mount-point)
|
--automount --auto-mount-point)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2462,6 +2598,12 @@ _VBoxManage() {
|
|||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
modify)
|
||||||
|
items=(--readonly --automount --auto-mount-point
|
||||||
|
--symlink-policy)
|
||||||
|
_get_excluded_items "${items[@]}"
|
||||||
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2495,12 +2637,12 @@ _VBoxManage() {
|
|||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
else
|
else
|
||||||
local items=( --details --machinereadable --log --password-id
|
local items=( --details --machinereadable --log --password-id
|
||||||
--password --password-idid --passwordfile )
|
--password )
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
|
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
--log|--passwordfile)
|
--log|--password)
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -2601,10 +2743,10 @@ _VBoxManage() {
|
|||||||
_vms_comp vms 1
|
_vms_comp vms 1
|
||||||
elif [[ "${prev}" == "--type" ]]; then
|
elif [[ "${prev}" == "--type" ]]; then
|
||||||
COMPREPLY=( $(compgen -W "gui sdl headless separate" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "gui sdl headless separate" -- ${cur}) )
|
||||||
elif [[ "${prev}" == "--passwordfile" ]]; then
|
elif [[ "${prev}" == "--password" ]]; then
|
||||||
COMPREPLY=( $(compgen -f -- ${cur}) )
|
COMPREPLY=( $(compgen -f -- ${cur}) )
|
||||||
else
|
else
|
||||||
items=( --type --putenv --passwordfile --password-id )
|
items=( --type --putenv --password --password-id )
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
@@ -2693,7 +2835,8 @@ _VBoxManage() {
|
|||||||
COMPREPLY=( $(compgen -W "detect install" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "detect install" -- ${cur}) )
|
||||||
else
|
else
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
--iso|--password-file|--additions-iso|--validation-kit-iso|\
|
--admin-password-file|--iso|--user-password-file|\
|
||||||
|
--additions-iso|--validation-kit-iso|\
|
||||||
--script-template|--post-install-template)
|
--script-template|--post-install-template)
|
||||||
COMPREPLY+=( $(compgen -f -- ${cur}) )
|
COMPREPLY+=( $(compgen -f -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2718,23 +2861,30 @@ _VBoxManage() {
|
|||||||
_vms_comp vms
|
_vms_comp vms
|
||||||
else
|
else
|
||||||
local items=(--additions-iso
|
local items=(--additions-iso
|
||||||
--auxiliary-base-path --country --dry-run
|
--auxiliary-base-path --country --dry-run
|
||||||
--extra-install-kernel-parameters
|
--extra-install-kernel-parameters
|
||||||
--full-user-name --hostname --image-index
|
--full-user-name --hostname --image-index
|
||||||
--install-additions --install-txs --iso --key
|
--install-additions --install-txs --iso
|
||||||
--language --locale --no-install-additions
|
--key --language --locale
|
||||||
--no-install-txs --package-selection-adjustment
|
--no-install-additions --no-install-txs
|
||||||
--password --password-file
|
--package-selection-adjustment
|
||||||
--post-install-command --post-install-template
|
--post-install-command
|
||||||
--script-template --start-vm --time-zone --user
|
--post-install-template --proxy
|
||||||
--validation-kit-iso)
|
--script-template --start-vm --time-zone
|
||||||
_get_excluded_items "${items[@]}"
|
--user --validation-kit-iso)
|
||||||
|
|
||||||
|
[[ " ${COMP_WORDS[*]} " != *" --admin-password "* &&
|
||||||
|
" ${COMP_WORDS[*]} " != *" --admin-password-file"* ]] &&
|
||||||
|
items+=( --admin-password-file --admin-password )
|
||||||
|
[[ " ${COMP_WORDS[*]} " != *" --user-password "* &&
|
||||||
|
" ${COMP_WORDS[*]} " != *" --user-password-file"* ]] &&
|
||||||
|
items+=( --user-password-file --user-password )
|
||||||
|
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -2828,8 +2978,9 @@ _VBoxManage() {
|
|||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
add|modify)
|
add|modify)
|
||||||
local items=(--target --name --action --active
|
local items=(--target --name --action --active
|
||||||
--vendorid --productid --revision --manufacturer
|
--vendorid --productid --port --revision
|
||||||
--product --remote --serialnumber --maskedinterfaces)
|
--manufacturer --product --remote --serialnumber
|
||||||
|
--maskedinterfaces)
|
||||||
_get_excluded_items "${items[@]}"
|
_get_excluded_items "${items[@]}"
|
||||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
@@ -2842,10 +2993,14 @@ _VBoxManage() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
complete -o default -F _VBoxManage VBoxManage
|
complete -o default -F _VBoxManage VBoxManage
|
||||||
complete -o default -F _VBoxManage vboxmanage
|
complete -o default -F _VBoxManage vboxmanage
|
||||||
|
|
||||||
|
if [[ "${BASH_SOURCE[0]}" != 'VBoxManage' &&
|
||||||
|
"${BASH_SOURCE[0]}" != 'vboxmanage' ]]; then
|
||||||
|
complete -o default -F _VBoxManage $(basename "${BASH_SOURCE[0]}")
|
||||||
|
fi
|
||||||
|
|
||||||
# vim: set ft=sh tw=80 sw=4 et :
|
# vim: set ft=sh tw=80 sw=4 et :
|
||||||
|
|||||||
Reference in New Issue
Block a user