Add bash completion for `swarm ca`

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2017-06-29 16:28:50 +02:00
parent 92a2a1d539
commit 5bd00a563e
1 changed files with 19 additions and 0 deletions

View File

@ -3270,6 +3270,7 @@ _docker_service_update_and_create() {
_docker_swarm() { _docker_swarm() {
local subcommands=" local subcommands="
ca
init init
join join
join-token join-token
@ -3290,6 +3291,24 @@ _docker_swarm() {
esac esac
} }
_docker_swarm_ca() {
case "$prev" in
--ca-cert|--ca-key)
_filedir
return
;;
--cert-expiry|--external-ca)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--ca-cert --ca-key --cert-expiry --detach -d --external-ca --help --quiet -q --rotate" -- "$cur" ) )
;;
esac
}
_docker_swarm_init() { _docker_swarm_init() {
case "$prev" in case "$prev" in
--advertise-addr) --advertise-addr)