You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-f FILE, --file=FILE
Obtain patterns from FILE, one per line. If this option is used multiple times or is combined with the -e (--regexp) option, search for all patterns given. The empty file contains zero patterns, and therefore matches nothing.
rg's behavior here is to treat an empty file as matching everything instead:
touch empty.txt
rg -l -f empty.txt
# prints all files
Sorry, I should have been clearer. I was requesting that the same handling of an empty file passed to -f be used. The logic is that rg may be programmatically invoked against a generated matches.txt, in which case there is value in treating an empty file as not matching anything.
What version of ripgrep are you using?
0.8.1
What operating system are you using ripgrep on?
Linux/WSL
Describe your question, feature request, or bug.
From
man grep
:rg's behavior here is to treat an empty file as matching everything instead:
See also #783
The text was updated successfully, but these errors were encountered: