[PATCH 4 of 4] Remove some options from 'hg grep':

Matt Mackall mpm at selenic.com
Sun Aug 28 15:17:27 CDT 2005


On Sun, Aug 28, 2005 at 04:07:35PM +0200, Thomas Arendsen Hein wrote:
> * Matt Mackall <mpm at selenic.com> [20050828 06:02]:
> > On Sat, Aug 27, 2005 at 08:14:03PM -0700, Bryan O'Sullivan wrote:
> > > On Sat, 2005-08-27 at 23:40 +0200, Thomas Arendsen Hein wrote:
> > > > -Z (we have -0 as in locate)

I think we ought to use -0 here. I can't find any reference to anyone
using -Z or --null with grep via Google, nor is it in the POSIX spec,
so I think it's more important to be consistent internally than
externally here.

> > > > -a (use "-r 0:tip" instead, or always grep all unless -r is given)

What was this doing?

-a needs to be --text, like grep(1) and hg diff.

> > > > -e (we have the PATTERN argument)

If we support -e, we need to support multiple patterns (which is what
it's there for in grep(1)).

> > > > -v (doesn't work, and this is more of a job for 'hg cat|grep')

How does hg cat help? It only handles one file/version. Invert
colliding with verbose is a bit of a problem.

> > > > -s (we have -q/--quiet)

Agreed.

> > > > -f (should be always enabled if -l used, or enable on -v/--verbose)

And what was this doing?

POSIX grep uses -f to indicate a file containing regexes.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list