Pārlūkot izejas kodu

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 <github@albersweb.de>
Harald Albers 10 gadi atpakaļ
vecāks
revīzija
aab82c5c22
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      contrib/completion/bash/docker

+ 1 - 1
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