On Sat, 24 May 2008, Nguyen Thai Ngoc Duy wrote: > On Sat, May 24, 2008 at 3:28 PM, Jakub Narebski <jnareb@xxxxxxxxx> wrote: >> Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes: >> >>> +--color:: >>> + Show colored matches. >>> + >> >> Why not borrow from GNU grep manpage? >> >> --colour[=WHEN], --color[=WHEN] >> Surround the matching string with the marker find in GREP_COLOR >> environment variable. WHEN may be 'never', 'always', or 'auto' >> >> We probably would also want it configurable (via config variables), >> as `color.grep' I guess. And color.grep.<slot>, where slot can be 'match', and probably later also 'context' (I don't remember if git-grep implements -C<num> option...). > Yes. But this patch was really to scratch my itch and I felt good > after having it colorized so did not bother with configuration system. > I will probably make it a config var when I get tired of typing > --color too often ;) Thanks for sharing, although I guess Junio would prefer more complete patch... >> I think compatibility with grep (using GREP_COLOR) would be good idea, >> and easily implemented. > > I had no idea that variable existed. Well, I have though that git always use external grep, so this would be for free. After reading the patch more carefully it seems like it isn't so. Still, perhaps that would be a good idea, but I guess for later patch. -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html