mirror of https://github.com/docker/compose.git
Fix suppressed blank in completion of `scale --help`
Wrong placement of `compopt -o` introduces an unexpected behavior that did not matter as long as --help was the only option (you would probably not continue to type after --help): completion of options would not automatically append a whitespace character as expected. For the outstanding addition of the --timeout option, which has an argument, this would mean that the user would have to type an extra whitespace after completion of --timeout before the argument could be added. Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
fc63454c99
commit
7e22719090
|
@ -278,10 +278,7 @@ _docker_compose_scale() {
|
|||
case "$prev" in
|
||||
=)
|
||||
COMPREPLY=("$cur")
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=( $(compgen -S "=" -W "$(___docker_compose_all_services_in_compose_file)" -- "$cur") )
|
||||
compopt -o nospace
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -289,6 +286,10 @@ _docker_compose_scale() {
|
|||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=( $(compgen -S "=" -W "$(___docker_compose_all_services_in_compose_file)" -- "$cur") )
|
||||
compopt -o nospace
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue