diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:02 -0700 |
commit | b332368de87fba4fd9e6f8c163240f14ca00a9ea (patch) | |
tree | 697bfc0820966aae7130f64cbac89195cc90d6e1 /Documentation | |
parent | Merge branch 'js/remote-improvements' (diff) | |
parent | grep: prefer builtin over external one when coloring results (diff) | |
download | tgif-b332368de87fba4fd9e6f8c163240f14ca00a9ea.tar.xz |
Merge branch 'rs/color-grep'
* rs/color-grep:
grep: prefer builtin over external one when coloring results
grep: cast printf %.*s "precision" argument explicitly to int
grep: add support for coloring with external greps
grep: color patterns in output
grep: add pmatch and eflags arguments to match_one_pattern()
grep: remove grep_opt argument from match_expr_eval()
grep: micro-optimize hit collection for AND nodes
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 19 | ||||
-rw-r--r-- | Documentation/git-grep.txt | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 44916b9e7f..12540b605f 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -553,6 +553,25 @@ color.diff.<slot>:: whitespace errors). The values of these variables may be specified as in color.branch.<slot>. +color.grep:: + When set to `always`, always highlight matches. When `false` (or + `never`), never. When set to `true` or `auto`, use color only + when the output is written to the terminal. Defaults to `false`. + +color.grep.external:: + The string value of this variable is passed to an external 'grep' + command as a command line option if match highlighting is turned + on. If set to an empty string, no option is passed at all, + turning off coloring for external 'grep' calls; this is the default. + For GNU grep, set it to `--color=always` to highlight matches even + when a pager is used. + +color.grep.match:: + Use customized color for matches. The value of this variable + may be specified as in color.branch.<slot>. It is passed using + the environment variables 'GREP_COLOR' and 'GREP_COLORS' when + calling an external 'grep'. + color.interactive:: When set to `always`, always use colors for interactive prompts and displays (such as those used by "git-add --interactive"). 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 |