mirror of https://github.com/docker/cli.git
Merge pull request #1004 from albers/completion--template-driver
Add bash completion for `secret|config create --template-driver`
This commit is contained in:
commit
0685bb29db
|
@ -1220,14 +1220,18 @@ _docker_config_create() {
|
||||||
--label|-l)
|
--label|-l)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--template-driver)
|
||||||
|
COMPREPLY=( $( compgen -W "golang" -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W "--help --label -l" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--help --label -l --template-driver" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local counter=$(__docker_pos_first_nonflag '--label|-l')
|
local counter=$(__docker_pos_first_nonflag '--label|-l|--template-driver')
|
||||||
if [ "$cword" -eq "$((counter + 1))" ]; then
|
if [ "$cword" -eq "$((counter + 1))" ]; then
|
||||||
_filedir
|
_filedir
|
||||||
fi
|
fi
|
||||||
|
@ -4238,14 +4242,18 @@ _docker_secret_create() {
|
||||||
--driver|-d|--label|-l)
|
--driver|-d|--label|-l)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--template-driver)
|
||||||
|
COMPREPLY=( $( compgen -W "golang" -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W "--driver -d --help --label -l" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--driver -d --help --label -l --template-driver" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local counter=$(__docker_pos_first_nonflag '--driver|-d|--label|-l')
|
local counter=$(__docker_pos_first_nonflag '--driver|-d|--label|-l|--template-driver')
|
||||||
if [ "$cword" -eq "$((counter + 1))" ]; then
|
if [ "$cword" -eq "$((counter + 1))" ]; then
|
||||||
_filedir
|
_filedir
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue