aboutsummaryrefslogtreecommitdiff
path: root/graph.h
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-03-14 09:40:39 -0400
committerJunio C Hamano <gitster@pobox.com>2015-03-14 18:59:09 -0700
commitdb8d750876ce9c43b23ddfdbe618ec5dd12767ee (patch)
treece91304e272acfe7ad07812dfbd2248f03bdf77b /graph.h
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-db8d750876ce9c43b23ddfdbe618ec5dd12767ee.tar.gz
git-db8d750876ce9c43b23ddfdbe618ec5dd12767ee.tar.xz
contrib/completion: escape the forward slash in __git_match_ctag
The current definition results in an incorrect expansion of the term under zsh. For instance "/^${1////\\/}/" under zsh with the argument "hi" results in: /^/\/h/\/i/ This results in an output similar to this when trying to complete `git grep chartab` under zsh: :: git grep chartabawk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 } awk: cmd. line:1: ^ backslash not last character on line awk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 } awk: cmd. line:1: ^ syntax error Leaving the prompt in a goofy state until the user hits a key. Escaping the literal / in the parameter expansion (using "/^${1//\//\\/}/") results in: /^chartab/ allowing the completion to work correctly. This formulation also works under bash. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.h')
0 files changed, 0 insertions, 0 deletions