Re: [PATCH] git-grep: --and to combine patterns with and instead of or

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx> writes:

> Hello,
>
>> *AND* more than one pattern. (something I miss in normal grep)
>
> so do I.

So do I.

I am wondering if we would rather want to do something like
expression `find` command let's you build.  In other words:

	git grep --extended-expression '(' 'foo' -o 'bar' ')' -a 'frotz'

might be what we would eventually want.  And I have this nagging
suspicion that if we allow to say something like this

	git grep --and -e a -e b

right now, it would make it more cumbersome (read: backward
compatibility wart) to support both styles later.

I could be talked into

	git grep -e a -a -e b

but that would already be building that expression engine, so...

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]