From bce34149310bdddee5c70d51c7eb2320d0619603 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 27 Oct 2016 09:10:39 +0200 Subject: [PATCH] Move bash completion logic to new subcommand: info Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 4a475617ed..ee4b00c794 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2171,17 +2171,7 @@ _docker_import() { } _docker_info() { - case "$prev" in - --format|-f) - return - ;; - esac - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "--format -f --help" -- "$cur" ) ) - ;; - esac + _docker_system_info } _docker_inspect() { @@ -3181,7 +3171,17 @@ _docker_system_events() { } _docker_system_info() { - _docker_info + case "$prev" in + --format|-f) + return + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--format -f --help" -- "$cur" ) ) + ;; + esac } # TODO new command