git-completion.zsh: define __gitcomp_file compatibility function
commit926eb7ba4c52fbfee9fba86c16bb6c374857190e
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Tue, 5 Mar 2013 08:43:55 +0000 (5 09:43 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Mar 2013 16:54:03 +0000 (5 08:54 -0800)
treea61d197beb0eba259edd2eea553ef5b75d48cd12
parentfea16b47b603e7e4fa7fca198bd49229c0e5da3d
git-completion.zsh: define __gitcomp_file compatibility function

Commit fea16b47b60 (Fri Jan 11 19:48:43 2013, Manlio Perillo,
git-completion.bash: add support for path completion), introduced a new
__gitcomp_file function that uses the bash builtin "compgen". The
function was redefined for ZSH in the deprecated section of
git-completion.bash, but not in the new git-completion.zsh script.

As a result, users of git-completion.zsh trying to complete "git add
fo<tab>" get an error:

git add fo__gitcomp_file:8: command not found: compgen

This patch adds the redefinition and removes the error.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.zsh