On 2007.06.29 01:42:22 -0700, Josh Triplett wrote:
You need to convince grep. When piping its output to less, it won't
colorize unless forced. Always forcing color via GREP_OPTIONS might
break certain use-cases, and git-grep doesn't allow to pass options. So
for me, a bash alias it is:
alias gg='GREP_OPTIONS=--color=always git-grep'
You might need to set LESS=-R in addition to that, to stop less from
stripping the color codes.
Björn
-