Repository navigation
Resolves #1745 Docs: Document customizing standard help option names - #2532
Open
anirudh645 wants to merge 3 commits into
Open
anirudh645 wants to merge 3 commits into
anirudh645 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new documentation example sets picocli.help.name.0 to --help (duplicating the default long alias) and the stated defaults are incomplete, which can mislead readers.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the picocli user guide to document how to customize the names of the standard --help/--version options that are automatically added when mixinStandardHelpOptions = true.
Changes:
- Added a new NOTE explaining that the standard help/version option names can be customized via
picocli.*.name.*system properties. - Added Java and Kotlin snippets demonstrating setting these properties before creating a
CommandLineinstance.
File summaries
| File | Description |
|---|---|
| docs/index.adoc | Adds a NOTE + examples for customizing the auto-added help/version option names for mixinStandardHelpOptions. |
Review details
Suppressed comments (1)
docs/index.adoc:5806
- Same as the Java snippet: setting
picocli.help.name.0to--helpduplicates the default long alias and doesn't show how to customize the option names. Use a distinct short name (e.g.,-H) or also customize.name.1.
System.setProperty("picocli.help.name.0", "--help")
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| [NOTE] | ||
| ==== | ||
| The names of the automatically added help and version options can be customized with system properties set before initializing the `CommandLine` parser. The defaults are `-h` and `-V`. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have updated the docs to show how to update the names of the standard help and version options added by
mixinStandardHelpOptionsby usingSystem.setProperty("picocli.version.name.0", "-v");.I added this update as a note in the document, using other existing notes in the documentation as a reference. I am happy to perform any other edits required to match the standards of picocli.