Re: [PATCH 4/4] grep -O: allow optional argument specifying the pager (or editor)
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Jun 12, 2010, 17:16 UTC
- Message-ID
- <4C13C0E1.3070707@gnu.org>
- In-Reply-To
- <20100612163946.GD5657@burratino>
On 06/12/2010 06:39 PM, Jonathan Nieder wrote:
Show 12 quoted lines
> From: Johannes Schindelin<johannes.schindelin@gmx.de> > > Suppose you want to edit all files that contain a specific search term. > Of course, you can do something totally trivial such as > > git grep -z -e<term> | xargs -0r vi +/<term> > > but maybe you are happy that the same will be achieved by > > git grep -Ovi<term> > > now.
Ah, I had missed that the argument was optional. I think that optional arguments are slightly frowned upon for POSIX utilities, because they're a bit different. In fact, I think the only one is -i in sed (and BSD sed instead makes it mandatory...). Personally I have no problem with making -O in GNU grep optional too, I'll see what the other maintainers say.
Acked-by: Paolo Bonzini <bonzini@gnu.org>
Paolo