Only files who match all the words #2441
-
I have a command which show files that match any of the words.
I want a command which will show files that match all the words. All the patterns should have a match in the file (only then the file will the shown in the output). Is there any solution for that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Probably what I would do is something like Otherwise, ripgrep doesn't currently support arbitrary boolean expressions. The typical way to find matching lines containing See: #875 |
Beta Was this translation helpful? Give feedback.
Probably what I would do is something like
rg foo -l | xargs rg bar -l | xargs rg quux -l
.Otherwise, ripgrep doesn't currently support arbitrary boolean expressions. The typical way to find matching lines containing
foo
,bar
andquux
is with a shell pipeline:rg foo | rg bar | rg quux
.See: #875