mirror of https://github.com/docker/cli.git
Fix problem with = in completion of docker global options
Without this fix, `docker --log-driver fluentd --log-opt fluentd-tag=b` would complete `b` to `build`. Completion of the commands has to be nailed to __docker_pos_first_nonflag Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
21ba115188
commit
763ba5078d
|
@ -359,7 +359,10 @@ _docker_docker() {
|
||||||
COMPREPLY=( $( compgen -W "$boolean_options $main_options_with_args" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$boolean_options $main_options_with_args" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
local counter="$(__docker_pos_first_nonflag $main_options_with_args_glob)"
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue