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
fix: show 2 dashes on help for single digit option key or alias #1493
Conversation
To be coherent with what yargs/parser considers as a single dash key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me, I remembered this legitimate use of --100
:
fixes: #1454 |
@bcoe heads up this changes does not quite fits the example you gave of ...and unfortunately it breaks the help page for one of my modules that uses the
|
I ended up figuring out that yargs-parser itself does not have support to such pattern (which surprises me given its popularity within some of the day-to-day tools I use) I gave it a try at actually implementing support to it in the parser but not really sure how that will go 😬 yargs/yargs-parser#255 - if it eventually makes its way into the parser then we also should update |
To be coherent with what yargs/parser considers as an option single dash key, do not display '-1' but '--1' when '1' is used as an option key or an alias.
See #1454