path: root/t/
diff options
authorFelipe Contreras <>2012-01-25 01:37:02 (GMT)
committerJunio C Hamano <>2012-01-26 22:03:51 (GMT)
commitf15026b514a9fd7eac31313466345c9fae649afc (patch)
tree9c79171323686389d2b62d18ada7a13afc26d1f6 /t/
parent733137496aee6b74e49bd74d342efce8a3d2e95e (diff)
git-completion: workaround zsh COMPREPLY bug
zsh adds a backslash (foo\ ) for each item in the COMPREPLY array if IFS doesn't contain spaces. This issue has been reported[1], but there is no solution yet. This wasn't a problem due to another bug[2], which was fixed in zsh version 4.3.12. After this change, 'git checkout ma<tab>' would resolve to 'git checkout master\ '. Aditionally, the introduction of __gitcomp_nl in commit a31e626 (completion: optimize refs completion) in git also made the problem apparent, as Matthieu Moy reported. The simplest and most generic solution is to hide all the changes we do to IFS, so that "foo \nbar " is recognized by zsh as "foo bar". This works on versions of git before and after the introduction of __gitcomp_nl (a31e626), and versions of zsh before and after 4.3.12. Once zsh is fixed, we should conditionally disable this workaround to have the same benefits as bash users. [1] [2];a=commitdiff;h=2e25dfb8fd38dbef0a306282ffab1d343ce3ad8d Signed-off-by: Felipe Contreras <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
0 files changed, 0 insertions, 0 deletions