bash completion for docker swarm join-token

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 42b4d6ebe4)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Harald Albers 2016-07-22 17:39:55 +02:00 committed by Tibor Vass
parent fa89f32b13
commit ac6d5a01c1

View file

@ -1815,6 +1815,7 @@ _docker_swarm() {
init
inspect
join
join-token
leave
update
"
@ -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
-*)