completion: zsh: fix file completion regression
authorFelipe Contreras <redacted>
Tue, 1 Dec 2020 00:54:31 +0000 (18:54 -0600)
committerJunio C Hamano <redacted>
Tue, 1 Dec 2020 18:32:40 +0000 (10:32 -0800)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/completion/git-completion.zsh

index e0fda27f4c4395229074bced429406f26c989849..6c56296997f939cf6c46719c4efbc2305211e9ee 100644 (file)
@@ -116,6 +116,7 @@ __gitcomp_file ()
 {
        emulate -L zsh
 
+       compset -P '*[=:]'
        compadd -f -p "${2-}" -- ${(f)1} && _ret=0
 }
 
git clone https://git.99rst.org/PROJECT