Skip to content

Commit

Permalink
bash-completion/vm: fix completion script
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhong Yin <[email protected]>
  • Loading branch information
tcler committed Apr 25, 2021
1 parent da5660d commit 2de88d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bash-completion/vm
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ _vm()
fi
;;
del|delete|stop|start)
local vmlist=$(virsh list --name)
local vmlist=$(virsh list --all --name)
COMPREPLY=( $( compgen -W "$vmlist" -- "$cur" ) )
;;
reboot)
local vmlist=$(virsh list --name)
local vmlist=$(virsh list --all --name)
COMPREPLY=( $( compgen -W "-w $vmlist" -- "$cur" ) )
;;
lo|log|log*|co|con|cons|cons*|if|ifaddr|x|xm|xml|ed|edit)
if [[ $narg -le 3 ]]; then
local vmlist=$(virsh list --name)
local vmlist=$(virsh list --all --name)
COMPREPLY=( $( compgen -W "$vmlist" -- "$cur" ) )
else
COMPREPLY=( $( compgen -W "#<Enter>" -- "$cur" ) )
Expand Down

0 comments on commit 2de88d2

Please sign in to comment.