summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2020-11-30 18:54:31 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-01 10:32:40 -0800
commitc5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e (patch)
tree63a78631fcd3160f7248437966c647a6aae16368 /contrib
parentzsh: update copyright notices (diff)
downloadtgif-c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e.tar.xz
completion: zsh: fix file completion regression
Turns out we always need to set the ignored prefix (compset) to have similar behavior as in default Bash. The issue can be seen with: git show master:<tab> Commit 94b2901cfe wrongly removed it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index e0fda27f4c..6c56296997 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -116,6 +116,7 @@ __gitcomp_file ()
{
emulate -L zsh
+ compset -P '*[=:]'
compadd -f -p "${2-}" -- ${(f)1} && _ret=0
}