From 9e164dedaaf7760b111bb9776ef102a0ef492387 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 27 Oct 2016 09:05:21 +0200 Subject: [PATCH] Add bash completion for new `docker system` command family Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 5c918e022a..29c2ab73cf 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3151,6 +3151,45 @@ _docker_stop() { _docker_container_stop } + +_docker_system() { + local subcommands=" + df + events + info + prune + " + __docker_subcommands "$subcommands $aliases" && return + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--help" -- "$cur" ) ) + ;; + *) + COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) ) + ;; + esac +} + +# TODO new command +_docker_system_df() { + : +} + +_docker_system_events() { + _docker_events +} + +_docker_system_info() { + _docker_info +} + +# TODO new command +_docker_system_prune() { + : +} + + _docker_tag() { _docker_image_tag } @@ -3325,6 +3364,7 @@ _docker() { stats stop swarm + system tag top unpause