how do I force ripgrep to search the CWD instead of reading from a pipe? #2585
Describe your feature requestI would like an option to tell ripgrep, that despite being connected to a pipe, it should not search standard input, so that it will do a normal recursive search. Don't know about the name. Motivationripgrep does not work from within Emacs when used as the grep-command on Windows. It exits immediately with error code 1, or hangs. import subprocess
subprocess.check_output(['rg','SomeSearchTerm'])But never mind the reason, I would just like an option to fix it. |
Replies: 3 comments 1 reply
|
Why doesn't |
|
Good point. |
|
The key insight is that by omitting the path argument you are basically saying, "ripgrep, please guess whether to search the current working directory or stdin." Due to idiosyncracies in how processes are created in various contexts, it is impossible for ripgrep to guess correctly 100% of the time. |
Why doesn't
rg foo ./work?