Updated debugvm command

This commit is contained in:
2023-03-13 18:14:27 +01:00
parent 4557521b27
commit a839731fe6

View File

@@ -1071,16 +1071,17 @@ _VBoxManage() {
;; ;;
"debugvm") "debugvm")
items=(dumpguestcore info injectnmi log logdest logflags osdetect items=(dumpvmcore info injectnmi log logdest logflags osdetect
osinfo osdmesg getregisters setregisters show statistics stack) osinfo osdmesg getregisters setregisters show stack statistics
guestsample)
if [[ ${prev} == ${cmd} ]]; then if [[ ${prev} == ${cmd} ]]; then
_vms_comp runningvms _vms_comp runningvms
else else
_find_item_name 2 _find_item_name 2
subcommand=${COMP_WORDS[$((index+1))]} subcommand=${COMP_WORDS[$((index+1))]}
if [[ " ${items[@]} " == *" $subcommand "* ]]; then if [[ " ${items[*]} " == *" $subcommand "* ]]; then
case "${subcommand}" in case "${subcommand}" in
dumpguestcore) dumpvmcore)
_get_excluded_items "--filename" _get_excluded_items "--filename"
COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
;; ;;
@@ -1105,10 +1106,13 @@ _VBoxManage() {
COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
;; ;;
osdmesg) osdmesg)
items=() items=(--lines)
[[ " ${COMP_WORDS[@]} " != *" --lines "* && _get_excluded_items "${items[@]}"
" ${COMP_WORDS[@]} " != *" -n "* ]] && COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
items+=(--lines -n) ;;
guestsample)
items=(--filename --sample-interval-us
--sample-time-us)
_get_excluded_items "${items[@]}" _get_excluded_items "${items[@]}"
COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) COMPREPLY=( $(compgen -W "$result" -- ${cur}) )
;; ;;