From f58b6746d7ab3fffb917430f9df8446ce8bec21e Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 20 Oct 2016 09:11:25 +0200 Subject: [PATCH] Move bash completion logic to new subcommand: start Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 6a5267c8c2..487e71c96b 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -1582,7 +1582,16 @@ _docker_container_run() { } _docker_container_start() { - _docker_start + __docker_complete_detach-keys && return + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--attach -a --detach-keys --help --interactive -i" -- "$cur" ) ) + ;; + *) + __docker_complete_containers_stopped + ;; + esac } _docker_container_stats() { @@ -2900,16 +2909,7 @@ _docker_search() { } _docker_start() { - __docker_complete_detach-keys && return - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "--attach -a --detach-keys --help --interactive -i" -- "$cur" ) ) - ;; - *) - __docker_complete_containers_stopped - ;; - esac + _docker_container_start } _docker_stats() {