tomnomnom / gf

A wrapper around grep, to help you grep for things
MIT License
1.81k stars 318 forks source link

Force stdin when grepping piped data #53

Open fersingb opened 3 years ago

fersingb commented 3 years ago

According to the grep man page: If no FILE is given, recursive searches examine the working directory, and nonrecursive searches read standard input.

In the case of gf, most patterns usually use the recursive flag which will prevent gf to work as expected when piping data to it. This commit fixes this behavior, forcing grep to process stdin even when the recursive flag is used.