summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc56bc0)
raw | patch | inline | side by side (parent: dc56bc0)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 24 Sep 2005 22:09:48 +0000 (15:09 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 24 Sep 2005 22:09:48 +0000 (15:09 -0700) |
People typically say 'grep -e $pattern' because $pattern has a leading
dash which would be mistaken as a grep flag. Make sure we pass -e in
front of $pattern when we invoke grep.
Signed-off-by: Junio C Hamano <junkio@cox.net>
dash which would be mistaken as a grep flag. Make sure we pass -e in
front of $pattern when we invoke grep.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-grep.sh | patch | blob | history |
diff --git a/git-grep.sh b/git-grep.sh
index 51924fd7c38a4fd70f59069a3eecbfe787626375..e7a35ebd707c6ef485a26f4e1ece57fa248e0106 100755 (executable)
--- a/git-grep.sh
+++ b/git-grep.sh
shift
done
git-ls-files -z "${git_flags[@]}" "$@" |
- xargs -0 grep "${flags[@]}" "$pattern"
+ xargs -0 grep "${flags[@]}" -e "$pattern"