| ▲ | Tell HN: Fastmod Is Nice | |
| 2 points by gchamonlive 5 hours ago | ||
I wanted to make a blog post, but life happens and I think a quick submission also does the job. I always get aggro trying to reuse a regex that works on `rg` in `sed`. You
It works but then
Nothing happens...Ah yes! Extended regex...
What? Still nothing? Let me check the docs:
Ah yes... its `-E`.But fastmod, which is mentioned in at the end of https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#search-and-replace is surprisingly good, both in terms of performance/ux and compatibility. You just:
It will open a confirmation window for every change so you can review and apply it, which you can bypass with --accept-all, which doesn't have a shorthand which is a correct decision IMHO. | ||