Unable to replace with a dash involved
See original GitHub issueThis command fails:
renamer --find '_Small' --replace '-sm'
because it thinks -sm
is another command line flag that it doesn’t recognize. I assume this is actually an issue with what library you’re using for argument parsing, but I thought you would want to know, as there are plenty of other argument parsers to choose from. Here’s the output:
As you can see, it confuses the program a bit.
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
with a single space? Replace method not working
In your code, I only see .Replace(" ", "-"); (eg. Replace space with dash ). I don't see what you describe, which is...
Read more >Autoformat converts some hyphens to long dashes in Word
This appears when you move the pointer over the corrected hyphen. Then, click Undo Dash. When you use AutoCorrect Options, you can also...
Read more >55292 – autocorrect does not correct two dashes to ... - Bugzilla
If one sets auto-correct to correct two dashes (--) with an em-dash, auto-correct only works if the double-dash is discreet (separated from ...
Read more >Can't replace em dashes imported as question marks in string
I just wanted to throw a line in there to replace question marks with a hyphen. When I try to match on "?"...
Read more >Inserting a true dash by replacing a hyphen with a dash
John Dixon, independent medical writer and trainer in scientific writing skills, provides a useful tip for medical writers who work in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed and released in renamer v0.6.1.
The “Unable to replace with a dash involved” issue is resolved within the command-line-args module, which renamer uses.
See here for a description how to avoid ambiguous values. In summary, you use
--option=value
notation, for example:I get similar output for the guide using the standard command prompt on Windows 7, and node 0.10 (not my typical environment, but possibly worth mentioning). The font there is “Terminal”.