mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-19 12:28:19 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab6d9f7cd9 | |||
| 3bb795a1e3 |
@@ -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.8, and should contain all commands and their options.
|
7.0.10, 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:
|
||||||
|
|||||||
23
VBoxManage
23
VBoxManage
@@ -4,7 +4,7 @@
|
|||||||
# URL: https://bitbucket.org/gryf/vboxmanage-bash-completion
|
# 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.8
|
# Version: 7.0.10
|
||||||
|
|
||||||
|
|
||||||
_VBoxManage() {
|
_VBoxManage() {
|
||||||
@@ -677,11 +677,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 "create info terminate start
|
||||||
pause" -- ${cur}) )
|
pause reset" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
image)
|
image)
|
||||||
COMPREPLY=( $(compgen -W "create info delete import
|
COMPREPLY=( $(compgen -W "create info delete import
|
||||||
@@ -692,6 +693,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
|
||||||
@@ -1425,7 +1433,7 @@ _VBoxManage() {
|
|||||||
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
if [[ " ${items[*]} " == *" $subcommand "* ]]; then
|
||||||
case "${subcommand}" in
|
case "${subcommand}" in
|
||||||
run)
|
run)
|
||||||
items=( --domain --dos2unix --exe
|
items=( --arg0 --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 -- )
|
||||||
@@ -1445,9 +1453,10 @@ _VBoxManage() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
start)
|
start)
|
||||||
items=( --domain --exe --ignore-orphaned-processes
|
items=( --arg0 --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 "* ]] &&
|
||||||
|
|||||||
Reference in New Issue
Block a user