You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This time I have had read the README properly, at least I hope so)
The documentation in the readme doesn't explicitly say that --replace actually writes the replacement to file, but neither does it say the opposite. I would have assumed "Search and replace" meant write changes to file.
The current functionally appears to replace correctly in the output, but provide no way (I can see) to write those changes to file:
samuel:~||echo hello world > foo
samuel:~|| rg hello --replace "good bye" foo
1:good bye world
samuel:~|| cat foo
hello world
Same happens for recursive search and (don't) replace.
Again version 0.2.1 on ubuntu 16.04.
The text was updated successfully, but these errors were encountered:
Indeed, it does not. It was requested to do in #74, but I'm pretty firmly oppposed.
A "search and replace" isn't really a standard option. Even a tool like sed won't do it without explicitly asking for it.
I agree the docs could be clarified.
BurntSushi
changed the title
--replace doesn't write to files
the documentation for --replace should clarify that it doesn't write to files
Oct 4, 2016
I've continued the feature request on #74, personally I find sed a complete mind f**k and as you say it's not a standard option of other commands which is why I'm so keen for it here.
(This time I have had read the README properly, at least I hope so)
The documentation in the readme doesn't explicitly say that
--replace
actually writes the replacement to file, but neither does it say the opposite. I would have assumed "Search and replace" meant write changes to file.The current functionally appears to replace correctly in the output, but provide no way (I can see) to write those changes to file:
Same happens for recursive search and (don't) replace.
Again version 0.2.1 on ubuntu 16.04.
The text was updated successfully, but these errors were encountered: