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

structopt mangles colons in "author" string sourced from Cargo.toml #156

Closed
ssokolow opened this issue Dec 13, 2018 · 5 comments
Closed
Labels
enhancement We would love to have this feature! Feel free to supply a PR

Comments

@ssokolow
Copy link

ssokolow commented Dec 13, 2018

As a matter of convenience, I've had a spam-guarded contact form in my user.email Git property ever since I started using Git long ago.

This seems to have tripped off a bug in structopt. Cargo transcribes it correctly...

[package]
authors = ["Stephan Sokolow <http://www.ssokolow.com/ContactMe>"]

...but then, when I view the resulting --help output, the colon has been replaced with a comma followed by a space.

Stephan Sokolow <http, //www.ssokolow.com/ContactMe>

Manually specifying author="Stephan Sokolow <http://www.ssokolow.com/ContactMe>" causes it to pass through to --help unaltered.

(That said, I'm not in a hurry to have it fixed. I used author="" to silence that default as soon as I noticed it, both to achieve maximum consistency with the --help output all of the other CLI tools on my Linux machines and because it feels either egotistical or attention-seeking to display my name in my --help output.)

EDIT: Oops. forgot to mention that I'm on structopt 0.2.14. (I just began a new project and that's what cargo add structopt pulled in.)

@ssokolow ssokolow changed the title structopt mangles colons in Cargo.toml "author" string structopt mangles colons in "author" string sourced from Cargo.toml Dec 13, 2018
@TeXitoi
Copy link
Owner

TeXitoi commented Dec 13, 2018

That's because cargo separe authors with colon. I don't have any simple solution.

@TeXitoi TeXitoi added the enhancement We would love to have this feature! Feel free to supply a PR label Dec 19, 2018
@bkchr
Copy link

bkchr commented Jan 7, 2019

Couldn't this be replaced by a more context aware replace. Something that does not replace : when the : is in a < >?

@TeXitoi
Copy link
Owner

TeXitoi commented Jan 7, 2019

Maybe easier: do not replace if followed by //

I'll accept such a PR.

@CreepySkeleton
Copy link
Collaborator

@TeXitoi we can close this

@TeXitoi
Copy link
Owner

TeXitoi commented Sep 18, 2019

Of course, thanks for your fix.

@TeXitoi TeXitoi closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement We would love to have this feature! Feel free to supply a PR
Projects
None yet
Development

No branches or pull requests

4 participants