Skip to content
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

Feature request: Skip line if regex does not match. #164

Open
guettli opened this issue Jun 29, 2022 · 3 comments
Open

Feature request: Skip line if regex does not match. #164

guettli opened this issue Jun 29, 2022 · 3 comments
Labels
M-needs triage Meta: Maintainer label me!

Comments

@guettli
Copy link

guettli commented Jun 29, 2022

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.

@CosmicHorrorDev CosmicHorrorDev added the M-needs triage Meta: Maintainer label me! label May 17, 2023
@CosmicHorrorDev
Copy link
Collaborator

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?

@CosmicHorrorDev
Copy link
Collaborator

Or did you have something more like #150 in mind?

@alexilyaev
Copy link

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: #238 (comment)

I would personally like to have #150 regardless of --diff ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-needs triage Meta: Maintainer label me!
Projects
None yet
Development

No branches or pull requests

3 participants