git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-grep: add --color to highlight matches
Date: Sat, 24 May 2008 01:28:13 -0700 (PDT)	[thread overview]
Message-ID: <m3ve142jkc.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080524043118.GA23118@laptop>

Nguyễn Thái Ngọc 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.

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

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-05-24  8:29 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 [this message]
2008-05-24  9:20   ` Nguyen Thai Ngoc Duy
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=m3ve142jkc.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@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).