completion: Offer all commands after --verbose

This fixes an old remnant of the past. Even though the '--verbose'
option may not do anything for the command, it is compatible with all
of them.

https://github.com/containers/toolbox/pull/292
This commit is contained in:
Harry Míchal 2019-10-10 14:23:37 +02:00 committed by Debarshi Ray
parent 7565f96808
commit 75a513bf10
1 changed files with 2 additions and 4 deletions

View File

@ -13,8 +13,7 @@ __toolbox() {
local MIN_VERSION=29
local RAWHIDE_VERSION=32
local verbose_commands="create enter help init-container list run"
local commands="$verbose_commands rm rmi"
local commands="create enter help init-container list rm rmi run"
declare -A options
local options=([create]="--candidate-registry --container --image --release" \
@ -34,8 +33,7 @@ __toolbox() {
fi
case "$prev" in
--verbose)
mapfile -t COMPREPLY < <(compgen -W "$verbose_commands" -- "$2")
mapfile -t COMPREPLY < <(compgen -W "$commands" -- "$2")
return 0
;;
--container)