-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fixes #28440 - Help contains squeezed options #323
Fixes #28440 - Help contains squeezed options #323
Conversation
Provides a base for squeezed options and seems ok, but my knowledge in this area is fairly limited. |
ede13f7
to
597c47b
Compare
597c47b
to
a7548e5
Compare
d761c6b
to
6ee19a9
Compare
6ee19a9
to
4385494
Compare
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.
great work @ofedoren !
option_family(options = {}) do | ||
# parent is the main option. Must be single, option family can have only one parent. | ||
parent switches, type, description, options | ||
# child is an additional option. Could be none or more than one. Aren't shown in the help output. |
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.
switch is not so clear to me in that context. what does it means?
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.
switches are '--something'
or ['--option-one', '--option-two']
. It's how it's named in Clamp.
This PR introduces a way to squeeze options in help output by grouping the options in 'families'.
TODO:
Example (for better examples see theforeman/hammer-cli-foreman#489):