1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #24934 from albers/completion-swarm-join-token

bash completion for `docker swarm join-token`
This commit is contained in:
Tibor Vass 2016-07-22 11:24:25 -07:00 committed by GitHub
commit 771cf83807

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
-*)