Add bash completion for `docker engine` command family

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2019-01-20 22:46:24 +01:00
parent 059c085261
commit e3544b2e99
1 changed files with 63 additions and 0 deletions

View File

@ -2716,6 +2716,68 @@ _docker_diff() {
_docker_container_diff
}
_docker_engine() {
local subcommands="
activate
check
update
"
__docker_subcommands "$subcommands" && return
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
;;
esac
}
_docker_engine_activate() {
case "$prev" in
--containerd|--engine-image|--format|--license|--registry-prefix|--version)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--containerd --display-only --engine-image --format --help --license --quiet --registry-prefix --version" -- "$cur" ) )
;;
esac
}
_docker_engine_check() {
case "$prev" in
--containerd|--engine-image|--format|--registry-prefix)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--containerd --downgrades --engine-image --format --help --pre-releases --quiet -q --registry-prefix --upgrades" -- "$cur" ) )
;;
esac
}
_docker_engine_update() {
case "$prev" in
--containerd|--engine-image|--registry-prefix|--version)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--containerd --engine-image --help --registry-prefix --version" -- "$cur" ) )
;;
esac
}
_docker_events() {
_docker_system_events
}
@ -5394,6 +5456,7 @@ _docker() {
config
container
context
engine
image
network
node