composer-cli: Update bash completion for start-ostree
This commit is contained in:
parent
abf4bfe4b5
commit
c054d0184a
@ -3,7 +3,7 @@
|
|||||||
__composer_cli_flags="-h --help -j --json -s --socket --log -a --api --test -V"
|
__composer_cli_flags="-h --help -j --json -s --socket --log -a --api --test -V"
|
||||||
|
|
||||||
declare -A __composer_cli_cmds=(
|
declare -A __composer_cli_cmds=(
|
||||||
[compose]="list start types status log cancel delete info metadata logs results image"
|
[compose]="list start start-ostree types status log cancel delete info metadata logs results image"
|
||||||
[blueprints]="list show changes diff save delete depsolve push freeze tag undo workspace"
|
[blueprints]="list show changes diff save delete depsolve push freeze tag undo workspace"
|
||||||
[modules]="list"
|
[modules]="list"
|
||||||
[projects]="list info"
|
[projects]="list info"
|
||||||
@ -112,7 +112,7 @@ _composer_cli() {
|
|||||||
blueprints:freeze)
|
blueprints:freeze)
|
||||||
COMPREPLY=($(compgen -W "$(__composer_blueprints) show save" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_blueprints) show save" -- "${cur}"))
|
||||||
;;
|
;;
|
||||||
compose:start|blueprints:*)
|
compose:start|compose:start-ostree|blueprints:*)
|
||||||
COMPREPLY=($(compgen -W "$(__composer_blueprints)" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_blueprints)" -- "${cur}"))
|
||||||
;;
|
;;
|
||||||
compose:cancel)
|
compose:cancel)
|
||||||
@ -143,10 +143,11 @@ _composer_cli() {
|
|||||||
compose:delete)
|
compose:delete)
|
||||||
COMPREPLY=($(compgen -W "$(__composer_composes finished failed)" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_composes finished failed)" -- "${cur}"))
|
||||||
;;
|
;;
|
||||||
compose:start)
|
compose:start|compose:start-ostree)
|
||||||
|
subpos="$subcmd:$cmd_cword"
|
||||||
if [ "$cmd_cword" == 3 ]; then
|
if [ "$cmd_cword" == 3 ]; then
|
||||||
COMPREPLY=($(compgen -W "$(__composer_compose_types)" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_compose_types)" -- "${cur}"))
|
||||||
elif [ "$cmd_cword" == 5 ]; then
|
elif [ "$subpos" == "start:5" ] || [ "$subpos" == "start-ostree:7" ]; then
|
||||||
# If they have typed something looking like a path, use file completion
|
# If they have typed something looking like a path, use file completion
|
||||||
# otherwise suggest providers.
|
# otherwise suggest providers.
|
||||||
case "${cur}" in
|
case "${cur}" in
|
||||||
@ -158,7 +159,7 @@ _composer_cli() {
|
|||||||
COMPREPLY=($(compgen -W "$(__composer_provider_list)" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_provider_list)" -- "${cur}"))
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ "$cmd_cword" == 6 ]; then
|
elif [ "$subpos" == "start:6" ] || [ "$subpos" == "start-ostree:8" ]; then
|
||||||
COMPREPLY=($(compgen -W "$(__composer_profile_list ${prev})" -- "${cur}"))
|
COMPREPLY=($(compgen -W "$(__composer_profile_list ${prev})" -- "${cur}"))
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user