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

Convert camelCase into --camel-case type flags automatically #14

Closed
mikehearn opened this issue Apr 22, 2017 · 4 comments
Closed

Convert camelCase into --camel-case type flags automatically #14

mikehearn opened this issue Apr 22, 2017 · 4 comments
Assignees

Comments

@mikehearn
Copy link

It'd be nice if I didn't have to specify a custom name for that.

@xenomachina
Copy link
Owner

I agree. That should probably be the default behavior. Perhaps it should also be possible to specify a "name transformer" function when creating an ArgParser, in case someone doesn't like the default conversion.

@xenomachina
Copy link
Owner

xenomachina commented Apr 25, 2017

I've made this change.

For options, "camelCase" turns into "--camel-case".

For positional arguments (and option argNames), "camelCase" turns into "CAMEL-CASE".

xenomachina added a commit that referenced this issue Apr 25, 2017
Change `identifierToOptionName` so that it converts "fooBarBaz" into
"--foo-bar-baz".
@mikehearn
Copy link
Author

Is your last comment correct? camelCase already turns into --camelCase, the request was for --non-camel-case

@xenomachina
Copy link
Owner

Whoops! No, that was wrong. Thanks for catching that.

For options, "camelCase" turns into "--camel-case".

For positional arguments (and option argNames), "camelCase" turns into "CAMEL-CASE".

(I also corrected the original comment, to avoid future confusion.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants