Skip to content

Resolves #1745 Docs: Document customizing standard help option names - #2532

Open
anirudh645 wants to merge 3 commits into
remkop:mainfrom
anirudh645:master
Open

anirudh645 wants to merge 3 commits into
remkop:mainfrom
anirudh645:master

Conversation

@anirudh645

Copy link
Copy Markdown

I have updated the docs to show how to update the names of the standard help and version options added by mixinStandardHelpOptions by using System.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.

Copilot AI lite review requested due to automatic review settings September 5, 2026 02:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 CommandLine instance.
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.0 to --help duplicates 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.

Comment thread docs/index.adoc Outdated

[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`.
Comment thread docs/index.adoc Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants