Make it possible to create options sections
See original GitHub issueHi, I was wondering if there’s plans to enable options sections in help output like we can see in https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options
WHISPER (EXPERIMENTAL) OPTIONS:
--shh Enable Whisper
--shh.maxmessagesize value Max message size accepted (default: 1048576)
--shh.pow value Minimum POW accepted (default: 0.2)
DEPRECATED OPTIONS:
--fast Enable fast syncing through state downloads (replaced by --syncmode)
--light Enable light client mode (replaced by --syncmode)
MISC OPTIONS:
--help, -h show help
By having something like an attribute in the @Option
indicating a section id and map of sections id and sections titles in the @Command
. Then we would be able to group options (@Command.groupOptions
boolean attribute ?) by section.
Sorting (@Command.sortOptions
attribute) could also affect the order of appearance of that in the way that alphabetical would also sort section first and options in the section.
Also a being able to use @|
in sections title would be nice if we could also add an uppercase style :
@Command(sections = {
new Section("sec0","@|uppercase My first section|@",
new Section("sec1","@|uppercase My second section|@",
new Section("sec2","@|uppercase My third section|@"
}
then
@Option(section = "sec0" ... )
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to Create Form Sections and Logic in Google Forms
To create a section in your form, click the bottom button in the floating right panel. Add a form section in Google Forms....
Read more >Insert a section break - Microsoft Support
Add a section break. Select where you want a new section to begin. Go to Layout > Breaks. The types of section breaks...
Read more >Use section breaks to layout or format a document
You can use section breaks to change the layout or formatting of pages in your document. ... Set up the formatting change just...
Read more >Create an in-cell dropdown list - Computer - Google Support
On the Data validation rules panel, under "Criteria," select an option: Dropdown from a range: Choose the cells to include in the list....
Read more >Organize your sidebar with custom sections - Slack
Tip: Click the or arrow icons to collapse or expand individual sections. Press Option (Mac) or Alt (Windows/Linux) and click any custom section...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
An initial implementation of this has been pushed to master.
Example usage:
This will generate the following usage help messsage:
Please try this out and provide feedback.
TODO:
Picocli 4.0.0-alpha-1 has been released which includes support for option sections in the usage help. See https://picocli.info/#_argument_groups for details.
Please try this and provide feedback. We can still make changes.
What do you think of the annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?