Merge pull request #383 from albers/improve-completion-secret-create

Add file completion to bash completion for `secret create`
This commit is contained in:
Sebastiaan van Stijn 2017-08-02 00:45:24 +02:00 committed by GitHub
commit 2ae9276995
1 changed files with 7 additions and 1 deletions

View File

@ -1184,7 +1184,7 @@ _docker_config_create() {
;; ;;
*) *)
local counter=$(__docker_pos_first_nonflag '--label|-l') local counter=$(__docker_pos_first_nonflag '--label|-l')
if [ "$cword" -eq $((counter + 1)) ]; then if [ "$cword" -eq "$((counter + 1))" ]; then
_filedir _filedir
fi fi
;; ;;
@ -4159,6 +4159,12 @@ _docker_secret_create() {
-*) -*)
COMPREPLY=( $( compgen -W "--help --label -l" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--help --label -l" -- "$cur" ) )
;; ;;
*)
local counter=$(__docker_pos_first_nonflag '--label|-l')
if [ "$cword" -eq "$((counter + 1))" ]; then
_filedir
fi
;;
esac esac
} }