From 3de0756fd15d98d5f07045d8b52326efd2421678 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 --- contrib/completion/bash/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 1f397fa8..59d8a869 100644 --- a/contrib/completion/bash/docker +++ b/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