Summary
Negatable options are rendered as two separate entries in the help output. The conventional format (used by picocli and other CLI frameworks) is a single combined entry with --[no-] prefix.
Current output
--cds, --no-cds If specified Class Data Sharing (CDS) will be used...
--integrations, --no-integrations Enable or disable integration execution (default: true)
Expected output
--[no-]cds If specified Class Data Sharing (CDS) will be used...
--[no-]integrations Enable or disable integration execution (default: true)
The --[no-] format:
- Makes it immediately clear this is a single option with a negation form, not two separate options
- Is more compact
- Follows the convention established by picocli, GNU tools, and npm
- Should also apply in the synopsis:
[--[no-]cds] instead of [--cds] with --no-cds as a hidden implicit
Context
Found in jbang (jbangdev/jbang#2453). Picocli rendered negatable options as --[no-]cds.
Summary
Negatable options are rendered as two separate entries in the help output. The conventional format (used by picocli and other CLI frameworks) is a single combined entry with
--[no-]prefix.Current output
Expected output
The
--[no-]format:[--[no-]cds]instead of[--cds]with--no-cdsas a hidden implicitContext
Found in jbang (jbangdev/jbang#2453). Picocli rendered negatable options as
--[no-]cds.