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>
This commit is contained in:
Felipe Contreras 2020-11-30 18:54:31 -06:00 committed by Junio C Hamano
parent af806a2c24
commit c5dd0c861a

View file

@ -116,6 +116,7 @@ __gitcomp_file ()
{
emulate -L zsh
compset -P '*[=:]'
compadd -f -p "${2-}" -- ${(f)1} && _ret=0
}