completion: zsh: fix __gitcomp_direct()

Many callers append a space suffix, but zsh automatically appends a
space, making the completion add two spaces, for example:

  git log ma<tab>

Will complete 'master  '.

Let's remove that extra space.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2020-10-24 22:13:15 -05:00 committed by Junio C Hamano
parent 1d1c4a8759
commit 4ce2b5167b
2 changed files with 2 additions and 2 deletions

View File

@ -3498,7 +3498,7 @@ if [[ -n ${ZSH_VERSION-} ]] &&
local IFS=$'\n'
compset -P '*[=:]'
compadd -Q -- ${=1} && _ret=0
compadd -Q -- ${${=1}% } && _ret=0
}
__gitcomp_nl ()

View File

@ -74,7 +74,7 @@ __gitcomp_direct ()
local IFS=$'\n'
compset -P '*[=:]'
compadd -Q -- ${=1} && _ret=0
compadd -Q -- ${${=1}% } && _ret=0
}
__gitcomp_nl ()