mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
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>
Upstream-commit: 3de0756fd1
Component: cli
This commit is contained in:
committed by
Tibor Vass
parent
925fae2cca
commit
647a177c61
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user