Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -1220,14 +1220,18 @@ _docker_config_create() {
--label|-l)
return
;;
--template-driver)
COMPREPLY=( $( compgen -W "golang" -- "$cur" ) )
return
;;
esac

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
_filedir
fi
Expand Down Expand Up @@ -4238,14 +4242,18 @@ _docker_secret_create() {
--driver|-d|--label|-l)
return
;;
--template-driver)
COMPREPLY=( $( compgen -W "golang" -- "$cur" ) )
return
;;
esac

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
_filedir
fi
Expand Down