summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-12-01 00:54:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-01 18:32:40 (GMT)
commitc5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e (patch)
tree63a78631fcd3160f7248437966c647a6aae16368 /contrib/completion
parentaf806a2c2417d21dc024bf013ec511765441e286 (diff)
downloadgit-c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e.zip
git-c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e.tar.gz
git-c5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e.tar.bz2
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/completion')
-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 e0fda27..6c56296 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
}