Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "and -e" mode #876

Closed
mqudsi opened this issue Apr 3, 2018 · 1 comment
Closed

Support "and -e" mode #876

mqudsi opened this issue Apr 3, 2018 · 1 comment
Labels
duplicate An issue that is duplicative of another.

Comments

@mqudsi
Copy link

mqudsi commented Apr 3, 2018

Currently --expression/-e can be specified multiple times to specify additional expressions that will result in a line being included in the results. When searching for words containing EXPR1, EXPR2, and EXPR3, it is simple enough to type in -e EXPR1.*EXPR2.*EXPR3 as the pattern. However, if the order of the expression is not important and may vary, it would be necessary to invoke -e EXPR1.*EXPR2.*EXPR3 -e EXPR1.*EXPR3.*EXPR2 -e EXPR2.*EXPR1.*EXPR3 -e EXPR2.*EXPR3.*EXPR1 -e EXPR3.*EXPR1.*EXPR2 -e EXPR3.*EXPR2.*EXPR1.

I'm curious whether you would be open to rg supporting some means of combining patterns/expressions via AND syntax instead of the current OR syntax when given multiple -e statements.

@BurntSushi
Copy link
Owner

I'd rather track this in one ticket. I modified the title of #875 to encompass the broader story.

I'd be unlikely to do one and not the other. Namely, if we buy into one, then we might as well buy into both.

@BurntSushi BurntSushi added the duplicate An issue that is duplicative of another. label Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate An issue that is duplicative of another.
Projects
None yet
Development

No branches or pull requests

2 participants