git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-grep: small suggestion, -w flag
@ 2009-02-22 10:34 Ingo Molnar
  2009-02-22 11:15 ` René Scharfe
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2009-02-22 10:34 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-22 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 10:34 git-grep: small suggestion, -w flag Ingo Molnar
2009-02-22 11:15 ` René Scharfe
2009-02-22 16:14   ` Ingo Molnar
2009-02-22 17:20     ` Miklos Vajna
2009-02-22 17:23       ` Ingo Molnar

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