Merge pull request #30073 from albers/completion-swarm-join--availability

Add bash completion for `swarm join --availability`
This commit is contained in:
Akihiro Suda 2017-01-12 10:37:02 +09:00 committed by GitHub
commit d9a4bba398

View file

@ -2963,6 +2963,10 @@ _docker_swarm_join() {
fi
return
;;
--availability)
COMPREPLY=( $( compgen -W "active drain pause" -- "$cur" ) )
return
;;
--token)
return
;;
@ -2970,7 +2974,7 @@ _docker_swarm_join() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--advertise-addr --help --listen-addr --token" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--advertise-addr --availability --help --listen-addr --token" -- "$cur" ) )
;;
*:)
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )