-
Notifications
You must be signed in to change notification settings - Fork 124
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
Choice Options With Groups not grouping the options in the help message #88
Comments
Thanks for the report. I'm not sure I understand the issue. Can you share a minimal program that demonstrates the problem? |
I think I found the bug. It's actually in the Option interface. The ChoiceGroup added the option with the ChoiceGroup as the parmeterGroup whose groupName is null, and the option.groupName is set to the ChoiceGroup.groups[i].name. I think the groupName init code should have "?: groupName" to fall back to the option's own groupName even if it's parameterGroup?.groupName is null. The example at https://ajalt.github.io/clikt/options/#choice-options-with-groups shows this problem as the help output are not grouped according to the two options: "Options for loading from disk" and "Option for loading from network". P.S. Thanks for this amazing project!
|
You're completely correct. Thanks for looking into it! |
Currently the ChoiceGroup.provideDelegate doesn't register the option groups. So the sub group options are not properly grouped.
The text was updated successfully, but these errors were encountered: