Feature: allow --help for individual options
See original GitHub issueSometimes an option is more complex than the command itself. What if a command has a lot of (complex) options, how do you cover it all in the usage/help section for the command? What if you have only one command, but lots of options, wouldn’t you want to provide users the same help facility with options that is currently only possible with commands?
It might be useful to be able to provide help for individual options, so where the following triggers regular usage display:
command --help [--option 1 2 3]
The following might display the usage for a specific option:
command --option --help, or
command --option--help
The alternative is a 20 page usage display for that single command.
Thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Use Features to Organize Options Unit - Trailhead - Salesforce
Features give structure to bundles by grouping similar options, which then appear in separate sections on the configuration page.
Read more >Set up a Focus on iPhone - Apple Support
Focus is a feature that helps you reduce distractions and set boundaries. ... which people and apps to allow notifications from, an Options...
Read more >Set up and manage access requests - Microsoft Support
The access request feature allows people to request access to content that they do not currently have permission to see. As a site...
Read more >Manage hosted feature layers—ArcGIS Online Help
Click the Settings tab and scroll to the Feature Layer Settings section. Click Allow others to export to different formats and click Save....
Read more >Apply settings for Android mobile devices - Google Support
Allows users to share data and files from their work profile to the personal space on their device. When you check the Allow...
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
If
--option--help
or--option:help
is acceptable, you can already accomplish this to some extend. First for each complex option (example:-xxx
), define a companion help option (example:-xxx:help
):Then, in the application, check if help for this option is requested and print its specialized help:
The
help = true
attribute is likeusageHelp = true
in that it prevents a MissingParameterException being thrown for missing required options/positional parameters. It differs fromusageHelp
in that it won’t automatically print help for the command.It’s still a kind of hack having a shadow - - option–help for each - -option, but it works. I’d rather see it as 1st class API, but I don’t think this is in scope for picocli. Closing issue…