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

Replacement with empty string #68

Closed
gpoore opened this issue Jul 9, 2021 · 2 comments
Closed

Replacement with empty string #68

gpoore opened this issue Jul 9, 2021 · 2 comments

Comments

@gpoore
Copy link

gpoore commented Jul 9, 2021

Thanks for creating ruplacer! It's been great for renaming variables across source files.

Is there a way to replace matches with the empty string? For example,

ruplacer "string" ""

fails with

error: The following required arguments were not provided:
    <replacement>

I've been working around this by just adding an empty capture group () and then replacing with '$1'.

@dmerejkowsky
Copy link
Collaborator

dmerejkowsky commented Jul 11, 2021

Sorry but I can't reproduce that bug here. What operating system and what kind of terminal are you using?

@gpoore
Copy link
Author

gpoore commented Jul 11, 2021

I did some additional checking, and my issue is due to a longstanding bug in PowerShell:

So Ruplacer is working correctly...and now I have to worry about shell bugs whenever something doesn't work as expected!

@gpoore gpoore closed this as completed Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants