sade icon indicating copy to clipboard operation
sade copied to clipboard

Camel case options that are specified as dash-case

Open treshugart opened this issue 5 years ago • 2 comments

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?

treshugart avatar Jun 13 '19 06:06 treshugart

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

lukeed avatar Jun 13 '19 06:06 lukeed

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.

treshugart avatar Jun 13 '19 06:06 treshugart