summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-25 03:13:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-26 22:23:26 (GMT)
commit4ce2b5167bb63e7001e43ec5386528fb77c088fa (patch)
treef6794136589a00c5e66e65e1d0c57f338197512b /contrib/completion/git-completion.bash
parent1d1c4a875900d69c7f0a31e44c3e370dc80ab1ce (diff)
downloadgit-4ce2b5167bb63e7001e43ec5386528fb77c088fa.zip
git-4ce2b5167bb63e7001e43ec5386528fb77c088fa.tar.gz
git-4ce2b5167bb63e7001e43ec5386528fb77c088fa.tar.bz2
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>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0a96ad8..ec7dd12 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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 ()