Skip to content

Commit

Permalink
Merge pull request moby#24934 from albers/completion-swarm-join-token
Browse files Browse the repository at this point in the history
bash completion for `docker swarm join-token`
  • Loading branch information
tiborvass authored Jul 22, 2016
2 parents d602391 + 42b4d6e commit 771cf83
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,7 @@ _docker_swarm() {
init
inspect
join
join-token
leave
update
"
Expand Down Expand Up @@ -1884,6 +1885,20 @@ _docker_swarm_join() {
esac
}

_docker_swarm_join-token() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --quiet -q --rotate" -- "$cur" ) )
;;
*)
local counter=$( __docker_pos_first_nonflag )
if [ $cword -eq $counter ]; then
COMPREPLY=( $( compgen -W "manager worker" -- "$cur" ) )
fi
;;
esac
}

_docker_swarm_leave() {
case "$cur" in
-*)
Expand Down

0 comments on commit 771cf83

Please sign in to comment.