From: Ingo Molnar <mingo@elte.hu>
To: git@vger.kernel.org
Subject: git-grep: small suggestion, -w flag
Date: Sun, 22 Feb 2009 11:34:48 +0100 [thread overview]
Message-ID: <20090222103448.GA32119@elte.hu> (raw)
Here's a stupid little git-grep suggestion.
I recently transitioned from the use of egrep to git-grep, and i
like it very much (it nicely excludes build related files,
etc.), but there's one small detail: the lack of the -w flag.
It's equivalent to this pattern:
git grep '\<tick_length\>'
And it's the most common grep flag i (and i suspect many others)
use, in addition to the (already supported) -l flag.
When grepping for symbols in a large repository (such as the
Linux kernel) -w is very common and very useful - there's many
similar symbols, variants of each other. I use it when seeing a
symbol in an oops, etc.
While i realize that git-grep does not want to be a full grep
replacement, there's a real usability difference between having
to type:
git grep '\<schedule\>'
git grep -w schedule
(especially since backslash is a seldom used key during a normal
workflow, so accessing it is often a small mental hickup.)
Ingo
next reply other threads:[~2009-02-22 10:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-22 10:34 Ingo Molnar [this message]
2009-02-22 11:15 ` git-grep: small suggestion, -w flag René Scharfe
2009-02-22 16:14 ` Ingo Molnar
2009-02-22 17:20 ` Miklos Vajna
2009-02-22 17:23 ` Ingo Molnar
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=20090222103448.GA32119@elte.hu \
--to=mingo@elte.hu \
--cc=git@vger.kernel.org \
/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).