Merge pull request #268 from albers/completion-swarm-ca

Add bash completion for `swarm ca`
This commit is contained in:
Vincent Demeester 2017-06-30 11:42:28 +02:00 committed by GitHub
commit afcc75ddfe
1 changed files with 19 additions and 0 deletions

View File

@ -3284,6 +3284,7 @@ _docker_service_update_and_create() {
_docker_swarm() {
local subcommands="
ca
init
join
join-token
@ -3304,6 +3305,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)