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
show-hidden broken if parser has strip-dashed config #2356
Comments
Thanks for report. I reproduced, and think it is a bug. A work-around would be to use an option name without a dash with This is one of several bugs introduced by allowing the author to call Line 615 in e517318
One of the previous fixes for a situation where Yargs wanted to iterate over all the possible permutations was: This case is simpler, just want to lookup option by any name. That could be done by taking into account the parserConfiguration, or could be done by iterating over the aliases. Given this has come up a few times I would like to add a utility routine to wrap the logic. |
My current solution was to remove the |
Minimal Repro:
Outputs:
Where the
foo
option isn't shown, despite --help and --show-hidden being specified. If'strip-dashed': true,
is commented out, the new output is:Which is properly displaying the
foo
option.The text was updated successfully, but these errors were encountered: