sd
sd copied to clipboard
Feature request: Skip line if regex does not match.
Thank you for sd
it is fast and easy to use.
At the moment sd
prints the line unchanged, if the regex does not match.
It would be nice to have an option to skip lines where the regex does not match.
There's a draft PR adding diff support #238. Would that be sufficient for what you're talking about, or do you have something different in mind?
Or did you have something more like #150 in mind?
Would be useful when running on large files.
The --diff
is better than printing the whole file (as it is now), but may still be insufficient for changes made to many consecutive lines.
See my comment: https://github.com/chmln/sd/pull/238#issuecomment-1865998043
I would personally like to have #150 regardless of --diff
☺️