]> git.ipfire.org Git - thirdparty/git.git/commit - grep.c
grep: color patterns in output
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 7 Mar 2009 12:32:32 +0000 (13:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 7 Mar 2009 19:34:59 +0000 (11:34 -0800)
commit7e8f59d577e5615ceff06da0d9dde36a63608d53
tree3c9caf532b29a9780ce4065a302c87d9c5f320ef
parent79212772ce127cc32a67d50eaaa7f1c102ce7d5d
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>
Documentation/config.txt
Documentation/git-grep.txt
builtin-grep.c
grep.c
grep.h