From a91e0c5b33cc166b69f4d3ff49cf08f4bc9a9fc5 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 24 Jan 2017 10:00:18 +0100 Subject: [PATCH] Add missing options to bash completion for `docker swarm init|update` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 1d55bb068d..06df9674a4 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2969,6 +2969,13 @@ _docker_swarm_init() { fi return ;; + --availability) + COMPREPLY=( $( compgen -W "active drain pause" -- "$cur" ) ) + return + ;; + --cert-expiry|--dispatcher-heartbeat|--external-ca|--max-snapshots|--snapshot-interval|--task-history-limit) + return + ;; --listen-addr) if [[ $cur == *: ]] ; then COMPREPLY=( $( compgen -W "2377" -- "${cur##*:}" ) ) @@ -2982,7 +2989,7 @@ _docker_swarm_init() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--advertise-addr --force-new-cluster --help --listen-addr" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--advertise-addr --autolock --availability --cert-expiry --dispatcher-heartbeat --external-ca --force-new-cluster --help --listen-addr --max-snapshots --snapshot-interval --task-history-limit" -- "$cur" ) ) ;; esac } @@ -3050,14 +3057,14 @@ _docker_swarm_leave() { _docker_swarm_update() { case "$prev" in - --cert-expiry|--dispatcher-heartbeat|--max-snapshots|--snapshot-interval|--task-history-limit) + --cert-expiry|--dispatcher-heartbeat|--external-ca|--max-snapshots|--snapshot-interval|--task-history-limit) return ;; esac case "$cur" in -*) - COMPREPLY=( $( compgen -W "--cert-expiry --dispatcher-heartbeat --help --max-snapshots --snapshot-interval --task-history-limit" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--autolock --cert-expiry --dispatcher-heartbeat --external-ca --help --max-snapshots --snapshot-interval --task-history-limit" -- "$cur" ) ) ;; esac }