diff options
author | René Scharfe <l.s.r@web.de> | 2014-10-27 19:23:05 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-28 10:33:50 -0700 |
commit | 79a77109d3d0d364910ff7fa8c605c554dc4c3e0 (patch) | |
tree | c83513d1fdb135cad73d3865e30541f25084a540 /grep.h | |
parent | eeff891ac756fd97a05476446f15269b714ce4cc (diff) | |
download | git-79a77109d3d0d364910ff7fa8c605c554dc4c3e0.tar.gz |
grep: add color.grep.matchcontext and color.grep.matchselectedrs/grep-color-words
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>
Diffstat (limited to 'grep.h')
-rw-r--r-- | grep.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -124,7 +124,8 @@ struct grep_opt { char color_filename[COLOR_MAXLEN]; char color_function[COLOR_MAXLEN]; char color_lineno[COLOR_MAXLEN]; - char color_match[COLOR_MAXLEN]; + char color_match_context[COLOR_MAXLEN]; + char color_match_selected[COLOR_MAXLEN]; char color_selected[COLOR_MAXLEN]; char color_sep[COLOR_MAXLEN]; int regflags; |