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:
parent
7565f96808
commit
75a513bf10
|
@ -13,8 +13,7 @@ __toolbox() {
|
||||||
local MIN_VERSION=29
|
local MIN_VERSION=29
|
||||||
local RAWHIDE_VERSION=32
|
local RAWHIDE_VERSION=32
|
||||||
|
|
||||||
local verbose_commands="create enter help init-container list run"
|
local commands="create enter help init-container list rm rmi run"
|
||||||
local commands="$verbose_commands rm rmi"
|
|
||||||
|
|
||||||
declare -A options
|
declare -A options
|
||||||
local options=([create]="--candidate-registry --container --image --release" \
|
local options=([create]="--candidate-registry --container --image --release" \
|
||||||
|
@ -34,8 +33,7 @@ __toolbox() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--verbose)
|
mapfile -t COMPREPLY < <(compgen -W "$commands" -- "$2")
|
||||||
mapfile -t COMPREPLY < <(compgen -W "$verbose_commands" -- "$2")
|
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--container)
|
--container)
|
||||||
|
|
Loading…
Reference in New Issue