aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-03-07 13:32:32 +0100
committerJunio C Hamano <gitster@pobox.com>2009-03-07 11:34:59 -0800
commit7e8f59d577e5615ceff06da0d9dde36a63608d53 (patch)
tree3c9caf532b29a9780ce4065a302c87d9c5f320ef /Documentation/git-grep.txt
parent79212772ce127cc32a67d50eaaa7f1c102ce7d5d (diff)
downloadgit-7e8f59d577e5615ceff06da0d9dde36a63608d53.tar.gz
grep: color patterns in output
Coloring matches makes them easier to spot in the output. Add two options and two parameters: color.grep (to turn coloring on or off), color.grep.match (to set the color of matches), --color and --no-color (to turn coloring on or off, respectively). The output of external greps is not changed. This patch is based on earlier ones by Nguyễn Thái Ngọc Duy and Thiago Alves. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 553da6cbb1..fccb82deb4 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -17,6 +17,7 @@ SYNOPSIS
[-l | --files-with-matches] [-L | --files-without-match]
[-z | --null]
[-c | --count] [--all-match]
+ [--color | --no-color]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-f <file>] [-e] <pattern>
[--and|--or|--not|(|)|-e <pattern>...] [<tree>...]
@@ -105,6 +106,13 @@ OPTIONS
Instead of showing every matched line, show the number of
lines that match.
+--color::
+ Show colored matches.
+
+--no-color::
+ Turn off match highlighting, even when the configuration file
+ gives the default to color output.
+
-[ABC] <context>::
Show `context` trailing (`A` -- after), or leading (`B`
-- before), or both (`C` -- context) lines, and place a