-
-
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
passthru replace #997
Labels
enhancement
An enhancement to the functionality of the software.
libripgrep
An issue related to modularizing ripgrep into libraries.
Milestone
Comments
The replace flag should already be working with passthru. If it isn't, that sounds like a bug. Could you please provide a small reproducible example, asking with actual and expected output? |
|
@LippyBoy Hah, nice. I suspect I added that because the implementation simply doesn't support it. I'll look into adding this as part of libripgrep by not implementing |
BurntSushi
added
enhancement
An enhancement to the functionality of the software.
libripgrep
An issue related to modularizing ripgrep into libraries.
labels
Jul 29, 2018
BurntSushi
added a commit
that referenced
this issue
Aug 19, 2018
This commit updates the CHANGELOG to reflect all the work done to make libripgrep a reality. * Closes #162 (libripgrep) * Closes #176 (multiline search) * Closes #188 (opt-in PCRE2 support) * Closes #244 (JSON output) * Closes #416 (Windows CRLF support) * Closes #917 (trim prefix whitespace) * Closes #993 (add --null-data flag) * Closes #997 (--passthru works with --replace) * Fixes #2 (memory maps and context handling work) * Fixes #200 (ripgrep stops when pipe is closed) * Fixes #389 (more intuitive `-w/--word-regexp`) * Fixes #643 (detection of stdin on Windows is better) * Fixes #441, Fixes #690, Fixes #980 (empty matching lines are weird) * Fixes #764 (coalesce color escapes) * Fixes #922 (memory maps failing is no big deal) * Fixes #937 (color escapes no longer used for empty matches) * Fixes #940 (--passthru does not impact exit status) * Fixes #1013 (show runtime CPU features in --version output)
BurntSushi
added a commit
that referenced
this issue
Aug 20, 2018
This commit updates the CHANGELOG to reflect all the work done to make libripgrep a reality. * Closes #162 (libripgrep) * Closes #176 (multiline search) * Closes #188 (opt-in PCRE2 support) * Closes #244 (JSON output) * Closes #416 (Windows CRLF support) * Closes #917 (trim prefix whitespace) * Closes #993 (add --null-data flag) * Closes #997 (--passthru works with --replace) * Fixes #2 (memory maps and context handling work) * Fixes #200 (ripgrep stops when pipe is closed) * Fixes #389 (more intuitive `-w/--word-regexp`) * Fixes #643 (detection of stdin on Windows is better) * Fixes #441, Fixes #690, Fixes #980 (empty matching lines are weird) * Fixes #764 (coalesce color escapes) * Fixes #922 (memory maps failing is no big deal) * Fixes #937 (color escapes no longer used for empty matches) * Fixes #940 (--passthru does not impact exit status) * Fixes #1013 (show runtime CPU features in --version output)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
An enhancement to the functionality of the software.
libripgrep
An issue related to modularizing ripgrep into libraries.
What version of ripgrep are you using?
0.81
How did you install ripgrep?
releases deb
What operating system are you using ripgrep on?
Ubuntu 16.04
Describe your question, feature request, or bug.
It would be really great if the replace flag worked with the passthru flag - that is, it will replace everything that matches the regex, but will still output non-matching lines.
I know that you can use sed for this, but ripgrep is much more convenient and user friendly, and also highlighting the replacements is great.
Use cases:
The text was updated successfully, but these errors were encountered: