From dda64a649cb4dc00950f005b9fa3d36b7d63c9a2 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Sun, 12 Mar 2023 18:50:08 +0100 Subject: [PATCH] Updated showvminfo command. --- VBoxManage | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/VBoxManage b/VBoxManage index f29f59f..c29de38 100644 --- a/VBoxManage +++ b/VBoxManage @@ -2390,18 +2390,16 @@ _VBoxManage() { if [[ ${prev} == ${cmd} ]]; then _vms_comp vms else - if [[ " ${COMP_WORDS[@]} " == *" --log "* ]]; then - COMPREPLY=() - elif [[ " ${COMP_WORDS[@]} " == *" --details "* || - " ${COMP_WORDS[@]} " == *" --machinereadable "* ]]; then - local items=(--details --machinereadable) - _get_excluded_items "${items[@]}" - COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) - else - local items=(--details --machinereadable --log) - _get_excluded_items "${items[@]}" - COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) - fi + local items=( --details --machinereadable --log --password-id + --password --password-idid --passwordfile ) + _get_excluded_items "${items[@]}" + COMPREPLY=( $(compgen -W "$result" -- ${cur}) ) + + case "${prev}" in + --log|--passwordfile) + COMPREPLY=( $(compgen -f -- ${cur}) ) + ;; + esac fi ;;