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

Camel case options that are specified as dash-case #23

Open
treshugart opened this issue Jun 13, 2019 · 2 comments
Open

Camel case options that are specified as dash-case #23

treshugart opened this issue Jun 13, 2019 · 2 comments

Comments

@treshugart
Copy link

If one specifies --custom-option, it would be nice if you could access it as args.customOption instead of args["custom-option"].

Is this something you'd like to support?

@lukeed
Copy link
Owner

lukeed commented Jun 13, 2019

Hey man,

This was actually avoided intentionally. I know it's probably a shock to some, but I found it super annoying in other CLI builders that my flags weren't returned to me exactly as I defined them.

Plus, changing it now would be breaking and require a major bump

@treshugart
Copy link
Author

I was thinking that you could add camelcased getters that alias the un-camelcased value. This gets around the breaking change, doesn't dupe values and allows accessing via both.

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