grep: add color.grep.matchcontext and color.grep.matchselected
commit79a77109d3d0d364910ff7fa8c605c554dc4c3e0
authorRené Scharfe <l.s.r@web.de>
Mon, 27 Oct 2014 18:23:05 +0000 (27 19:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Oct 2014 17:33:50 +0000 (28 10:33 -0700)
treec83513d1fdb135cad73d3865e30541f25084a540
parenteeff891ac756fd97a05476446f15269b714ce4cc
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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
grep.c
grep.h
t/t7810-grep.sh