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] Verbose mode #120

Open
paw-lu opened this issue Apr 7, 2021 · 1 comment
Open

[Feature request] Verbose mode #120

paw-lu opened this issue Apr 7, 2021 · 1 comment
Labels
C-enhancement Category: New feature or request

Comments

@paw-lu
Copy link

paw-lu commented Apr 7, 2021

Firstly, thanks for making and sharing this tool. I find it really intuitive to use!

Sometimes I'll mess up a regex, misspell a word, or am too general with a regex and will modify the file in a way I didn't expect. I find myself wishing there was some way to signal the impact of my command without having to open up the file and find out later. Something like a verbose mode -v like in clis such as mv, cp, etc. That way the user gets immediate feedback.

% sd -v 'old' 'new' file.txt
Replaced 3 instances of "old" with "new" in file.txt

% sd -v 'old' 'new' file3.txt
Replaced 0 instances of "old" with "new" in file3.txt

% sd -v 'new' 'really_new' *.txt
Replaced 2 instances of "new" with "really_new" in file1.txt
Replaced 1 instances of "new" with "really_new" in file2.txt
Replaced 0 instances of "new" with "really_new" in file3.txt
@CosmicHorrorDev CosmicHorrorDev added the M-needs triage Meta: Maintainer label me! label 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
@dev-ardi
Copy link
Contributor

dev-ardi commented Nov 23, 2023

Is the --preview flag what you want or you have something more specific in mind

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