From d4e6422212c7af3c1a7a8d9cc82070b9d3f55ebc Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 24 Jan 2017 10:11:38 +0100 Subject: [PATCH] Add bash completion for `docker swarm unlock|unlock-key` Signed-off-by: Harald Albers (cherry picked from commit 07bd5152b3731c108e2dba57b1f51e6609b55ba3) Signed-off-by: Victor Vieux --- contrib/completion/bash/docker | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 68e122d1a7..2ac210a4c2 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2910,6 +2910,8 @@ _docker_swarm() { join join-token leave + unlock + unlock-key update " __docker_subcommands "$subcommands" && return @@ -3010,6 +3012,22 @@ _docker_swarm_leave() { esac } +_docker_swarm_unlock() { + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--help" -- "$cur" ) ) + ;; + esac +} + +_docker_swarm_unlock-key() { + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--help --quiet -q --rotate" -- "$cur" ) ) + ;; + esac +} + _docker_swarm_update() { case "$prev" in --cert-expiry|--dispatcher-heartbeat|--max-snapshots|--snapshot-interval|--task-history-limit)