-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
--file with empty file differs in behavior from grep #900
Copy link
Copy link
Closed
Labels
enhancementAn enhancement to the functionality of the software.An enhancement to the functionality of the software.
Description
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:
-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
See also #783
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementAn enhancement to the functionality of the software.An enhancement to the functionality of the software.