mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
bash completion for default port on docker swarm {init,join}
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 009d50e2d8
)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
00a988c2ad
commit
d8d1573b0d
1 changed files with 17 additions and 2 deletions
|
@ -1816,7 +1816,13 @@ _docker_swarm_init() {
|
|||
COMPREPLY=( $( compgen -W "manager none worker" -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
--listen-addr|--secret)
|
||||
--listen-addr)
|
||||
if [[ $cur == *: ]] ; then
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
fi
|
||||
return
|
||||
;;
|
||||
--secret)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
@ -1844,7 +1850,13 @@ _docker_swarm_inspect() {
|
|||
|
||||
_docker_swarm_join() {
|
||||
case "$prev" in
|
||||
--ca-hash|--listen-addr|--secret)
|
||||
--ca-hash|--secret)
|
||||
return
|
||||
;;
|
||||
--listen-addr)
|
||||
if [[ $cur == *: ]] ; then
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
fi
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
@ -1853,6 +1865,9 @@ _docker_swarm_join() {
|
|||
-*)
|
||||
COMPREPLY=( $( compgen -W "--ca-hash --help --listen-addr --manager --secret" -- "$cur" ) )
|
||||
;;
|
||||
*:)
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue