mirror of
https://github.com/gryf/vboxmanage-bash-completion.git
synced 2025-12-17 11:30:23 +01:00
Added new subcommand for debugvm
VBoxManage removed "debug" from list of commands in help, leaving only description for "debugvm" in section "Introspection and guest debugging" below all of the list, so that it is needed for adding "debugvm" to the list of available commands manually. Also "stack", new subcommand was added to "debugvm".
This commit is contained in:
24
VBoxManage
24
VBoxManage
@@ -1,9 +1,10 @@
|
||||
# bash command-line completion for VBoxManage command
|
||||
#
|
||||
# Author: Roman 'gryf' Dobosz <gryf73@gmail.com>
|
||||
# URL: https://bitbucket.org/gryf/vboxmanage-bash-completion
|
||||
# URL: https://bitbucket.org/gryf/vboxmanage-bash-completion
|
||||
# URL: https://github.com/gryf/vboxmanage-bash-completion
|
||||
# License: 3-clause BSD-style license (see LICENSE file)
|
||||
# Version: 5.1.26
|
||||
|
||||
_VBoxManage() {
|
||||
local cur prev opts cmd subcommand tmp items name index result
|
||||
@@ -440,6 +441,10 @@ _VBoxManage() {
|
||||
sort | \
|
||||
uniq)
|
||||
|
||||
# add debugvm command manually, since it's described differently in
|
||||
# vboxmanage help
|
||||
opts="${opts} debugvm"
|
||||
|
||||
if [[ ${cur} == "-q" || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
@@ -805,9 +810,9 @@ _VBoxManage() {
|
||||
fi
|
||||
;;
|
||||
|
||||
debugvm)
|
||||
"debugvm")
|
||||
items=(dumpguestcore info injectnmi log logdest logflags osdetect
|
||||
osinfo osdmesg getregisters setregisters show statistics)
|
||||
osinfo osdmesg getregisters setregisters show statistics stack)
|
||||
if [[ ${prev} == ${cmd} ]]; then
|
||||
_vms_comp runningvms
|
||||
else
|
||||
@@ -824,7 +829,7 @@ _VBoxManage() {
|
||||
_get_excluded_items "${items[@]}"
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
;;
|
||||
getregisters|setregisters)
|
||||
getregisters|setregisters|stack)
|
||||
_get_excluded_items "--cpu"
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
;;
|
||||
@@ -835,7 +840,7 @@ _VBoxManage() {
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
;;
|
||||
statistics)
|
||||
items=(--reset --pattern)
|
||||
items=(--reset --pattern --descriptions)
|
||||
_get_excluded_items "${items[@]}"
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
;;
|
||||
@@ -848,7 +853,6 @@ _VBoxManage() {
|
||||
COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
|
||||
;;
|
||||
esac
|
||||
_get_excluded_items "--descriptions"
|
||||
COMPREPLY+=( $(compgen -W "$result" -- ${cur}) )
|
||||
else
|
||||
[[ "${prev}" == "--filename" ]] && \
|
||||
@@ -989,10 +993,10 @@ _VBoxManage() {
|
||||
;;
|
||||
|
||||
guestcontrol)
|
||||
local items=(run start copyfrom copyto mkdir createdir
|
||||
createdirectory rmdir removedir removedirectory removefile rm mv
|
||||
move ren rename mktemp createtemp createtemporary stat list
|
||||
closeprocess closesession updatega updateguestadditions
|
||||
local items=(run start copyfrom copyto mkdir createdir
|
||||
createdirectory rmdir removedir removedirectory removefile rm mv
|
||||
move ren rename mktemp createtemp createtemporary stat list
|
||||
closeprocess closesession updatega updateguestadditions
|
||||
updateadditions watch)
|
||||
|
||||
if [[ ${prev} == ${cmd} ]]; then
|
||||
|
||||
Reference in New Issue
Block a user