-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ripgrep: add --pre flag #989
Conversation
0887977
to
e09265e
Compare
Replying to the differences comment here. I've been testing this as my primary grep ever since I posted my pull request. I haven't run into many issues. For ripgrep's In my testing the preprocessor could read stdin already. So, I left that attach-y code in but commented out. There is one gotcha with regard to I knew that man page formatting was a disaster. I figured it would be easy to fix if you liked this. Thanks! I think just a long User-specified commands/programs fail to be found/installed all the time. Somebody in Rust-land should do a better job with that someday, but I don't think we need to here. Anyway, I like all your changes. No real pushback from me. |
This is very weird. The first thing I tried was actually your example script in the |
Oops. Yeah, you probably want to put the filename after "cat". You don't for some things like gunzip where if you give it a filename it will replace your compressed file with a decompressed version. |
Oh, and of course, I would prefer it if we did attach each new input file to the |
@c-blake This PR does that. :-) |
The preprocessor flag accepts a command program and executes this
program for every input file that is searched. Instead of searching the
file directly, ripgrep will instead search the stdout contents of the
program.
Closes #978, Closes #981
This PR is based off of @c-blake's work in #981. See this comment for a description of the differences.
cc @okdana