From 6739612157d71843157562d103821659bb0e5da5 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 31 Jul 2015 19:25:42 +0200 Subject: [PATCH] Fix completion of commands after a global option with arg Without this fix, `docker -l info ` would not complete the commands. Signed-off-by: Harald Albers Upstream-commit: aab82c5c2230fa328bfac3c156b482634a42b73c Component: engine --- components/engine/contrib/completion/bash/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/contrib/completion/bash/docker b/components/engine/contrib/completion/bash/docker index 1f397fa8cd..59d8a869ee 100644 --- a/components/engine/contrib/completion/bash/docker +++ b/components/engine/contrib/completion/bash/docker @@ -341,7 +341,7 @@ _docker_docker() { COMPREPLY=( $( compgen -W "$boolean_options $global_options_with_args" -- "$cur" ) ) ;; *) - local counter="$(__docker_pos_first_nonflag $main_options_with_args_glob)" + local counter=$( __docker_pos_first_nonflag $(__docker_to_extglob "$global_options_with_args") ) if [ $cword -eq $counter ]; then COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) ) fi