Add bash completion for swarm ca
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 5bd00a563e)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
This commit is contained in:
committed by
Andrew Hsu
parent
fd95ab90ad
commit
8e17167c78
@@ -3292,6 +3292,7 @@ _docker_service_update_and_create() {
|
||||
|
||||
_docker_swarm() {
|
||||
local subcommands="
|
||||
ca
|
||||
init
|
||||
join
|
||||
join-token
|
||||
@@ -3312,6 +3313,24 @@ _docker_swarm() {
|
||||
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() {
|
||||
case "$prev" in
|
||||
--advertise-addr)
|
||||
|
||||
Reference in New Issue
Block a user