Merge branch 'mp/complete-paths'
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Mar 2013 21:11:55 +0000 (13:11 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Mar 2013 21:11:55 +0000 (13:11 -0800)
* mp/complete-paths:
git-completion.zsh: define __gitcomp_file compatibility function

contrib/completion/git-completion.zsh
index 45775021fff11011a98b90a6b8ebaa72d3d0cd9f..cf8116d4770c5924eaa647763d2bfae3dc14bacf 100644 (file)
@@ -60,6 +60,15 @@ __gitcomp_nl ()
        compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
 }
 
+__gitcomp_file ()
+{
+       emulate -L zsh
+
+       local IFS=$'\n'
+       compset -P '*[=:]'
+       compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
+}
+
 _git ()
 {
        local _ret=1