Re: [PATCH] git-grep: add --color to highlight matches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 26, 2008 at 6:00 PM, Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
> Hi,
>
> On Mon, 26 May 2008, Nguyen Thai Ngoc Duy wrote:
>
>> On Mon, May 26, 2008 at 5:16 PM, Johannes Schindelin
>> <Johannes.Schindelin@xxxxxx> wrote:
>> > Besides, it would be a kludge at best to work _twice_ to find out the
>> > search terms, once in the external grep, and a second time in the coloring
>> > code.  So I think it should not be done.
>>
>> I think if it's GNU grep, just passing it --color, it will grep and
>> colorize search terms in one turn.
>
> And what tells you that the called grep is GNU grep?

A newly added macro like HAS_GNU_GREP? Granted it won't work all the
time. The user who set the macro should know what he is doing. This
approach is IMHO fine as long as we don't allow color customization.
-- 
Duy
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux