git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-grep: add --color to highlight matches
Date: Sat, 24 May 2008 16:20:39 +0700	[thread overview]
Message-ID: <fcaeb9bf0805240220x78943f8ap67344a508531faa0@mail.gmail.com> (raw)
In-Reply-To: <m3ve142jkc.fsf@localhost.localdomain>

On Sat, May 24, 2008 at 3:28 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> 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.

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 ;)

> I think compatibility with grep (using GREP_COLOR) would be good idea,
> and easily implemented.

I had no idea that variable existed.

> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
>



-- 
Duy

  reply	other threads:[~2008-05-24  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24  4:31 [PATCH] git-grep: add --color to highlight matches Nguyễn Thái Ngọc Duy
2008-05-24  8:28 ` Jakub Narebski
2008-05-24  9:20   ` Nguyen Thai Ngoc Duy [this message]
2008-05-24 10:59     ` Jakub Narebski
2008-05-26  8:55       ` Andreas Ericsson
2008-05-26 10:16         ` Johannes Schindelin
2008-05-26 10:57           ` Nguyen Thai Ngoc Duy
2008-05-26 11:00             ` Johannes Schindelin
2008-05-26 11:07               ` Nguyen Thai Ngoc Duy
2008-05-26 11:29                 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcaeb9bf0805240220x78943f8ap67344a508531faa0@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).