Merge branch 'js/completion-ctags-pattern-substitution-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2015 20:00:17 +0000 (13:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2015 20:00:18 +0000 (13:00 -0700)
The code that reads from the ctags file in the completion script
(in contrib/) did not spell ${param/pattern/string} substitution
correctly, which happened to work with bash but not with zsh.

* js/completion-ctags-pattern-substitution-fix:
contrib/completion: escape the forward slash in __git_match_ctag

contrib/completion/git-completion.bash
index b8929084d079ef29987f7074dfb926f923b7697e..485619c2603e15222605bd3f19fa78bd2001dc5b 100644 (file)
@@ -1302,7 +1302,7 @@ _git_gitk ()
 }
 
 __git_match_ctag() {
-       awk "/^${1////\\/}/ { print \$1 }" "$2"
+       awk "/^${1//\//\\/}/ { print \$1 }" "$2"
 }
 
 _git_grep ()