diff mbox series

[try2] completion: zsh: fix file completion regression

Message ID 20201201005431.57963-1-felipe.contreras@gmail.com (mailing list archive)
State Accepted
Commit 78b7286a26878ce1a5683a9b443cb229af3f9bbd
Headers show
Series [try2] completion: zsh: fix file completion regression | expand

Commit Message

Felipe Contreras Dec. 1, 2020, 12:54 a.m. UTC
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>
---

This is a regression since the last big chunk of changes.

 contrib/completion/git-completion.zsh | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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
 }