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: only change file modified metadata on changed files #165

Open
moderation opened this issue Jul 5, 2022 · 1 comment
Open
Assignees
Labels
C-enhancement Category: New feature or request

Comments

@moderation
Copy link

When I run sd 0.146.0 0.147.0 *.*s in a directory, all files that match *.*s have their modified metadata to the time of the command execution, including files that don't have the desired string

Can sd be modified to only change the metadata for files that are actually changed?

@CosmicHorrorDev CosmicHorrorDev added the M-needs triage Meta: Maintainer label me! label May 17, 2023
@CosmicHorrorDev CosmicHorrorDev self-assigned this May 17, 2023
@CosmicHorrorDev CosmicHorrorDev added this to the v0.8.0 Release milestone May 17, 2023
@CosmicHorrorDev CosmicHorrorDev added C-enhancement Category: New feature or request and removed M-needs triage Meta: Maintainer label me! labels Oct 22, 2023
@nc7s
Copy link
Contributor

nc7s commented Dec 26, 2023

Replacer::replacen() currently returns a Cow::Borrowed if there is no capture. We can match on that, or we can return a Option<Cow::Owned> being None on no capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants