mirror of https://github.com/docker/cli.git
Merge pull request #269 from albers/completion-swarm-init--data-path-addr
Fix bash completion for `swarm init|join --data-path-addr`
This commit is contained in:
commit
9689ccab1b
|
@ -3322,6 +3322,10 @@ _docker_swarm_init() {
|
|||
--cert-expiry|--dispatcher-heartbeat|--external-ca|--max-snapshots|--snapshot-interval|--task-history-limit)
|
||||
return
|
||||
;;
|
||||
--data-path-addr)
|
||||
__docker_complete_local_interfaces
|
||||
return
|
||||
;;
|
||||
--listen-addr)
|
||||
if [[ $cur == *: ]] ; then
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
|
@ -3335,7 +3339,7 @@ _docker_swarm_init() {
|
|||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--advertise-addr --data-path-addr --autolock --availability --cert-expiry --dispatcher-heartbeat --external-ca --force-new-cluster --help --listen-addr --max-snapshots --snapshot-interval --task-history-limit" -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W "--advertise-addr --autolock --availability --cert-expiry --data-path-addr --dispatcher-heartbeat --external-ca --force-new-cluster --help --listen-addr --max-snapshots --snapshot-interval --task-history-limit" -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
@ -3351,6 +3355,14 @@ _docker_swarm_join() {
|
|||
fi
|
||||
return
|
||||
;;
|
||||
--availability)
|
||||
COMPREPLY=( $( compgen -W "active drain pause" -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
--data-path-addr)
|
||||
__docker_complete_local_interfaces
|
||||
return
|
||||
;;
|
||||
--listen-addr)
|
||||
if [[ $cur == *: ]] ; then
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
|
@ -3360,10 +3372,6 @@ _docker_swarm_join() {
|
|||
fi
|
||||
return
|
||||
;;
|
||||
--availability)
|
||||
COMPREPLY=( $( compgen -W "active drain pause" -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
--token)
|
||||
return
|
||||
;;
|
||||
|
@ -3371,7 +3379,7 @@ _docker_swarm_join() {
|
|||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--advertise-addr --data-path-addr --availability --help --listen-addr --token" -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W "--advertise-addr --availability --data-path-addr --help --listen-addr --token" -- "$cur" ) )
|
||||
;;
|
||||
*:)
|
||||
COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) )
|
||||
|
|
Loading…
Reference in New Issue