From 79a77109d3d0d364910ff7fa8c605c554dc4c3e0 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Mon, 27 Oct 2014 19:23:05 +0100 Subject: grep: add color.grep.matchcontext and color.grep.matchselected The config option color.grep.match can be used to specify the highlighting color for matching strings. Add the options matchContext and matchSelected to allow different colors to be specified for matching strings in the context vs. in selected lines. This is similar to the ms and mc specifiers in GNU grep's environment variable GREP_COLORS. Tests are from Zoltan Klinger's earlier attempt to solve the same issue in a different way. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- Documentation/config.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index ab26963d61..aa881fca1a 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -860,7 +860,11 @@ color.grep.:: `linenumber`;; line number prefix (when using `-n`) `match`;; - matching text + matching text (same as setting `matchContext` and `matchSelected`) +`matchContext`;; + matching text in context lines +`matchSelected`;; + matching text in selected lines `selected`;; non-matching text in selected lines `separator`;; -- cgit v1.3-5-g9baa