A co-occurring option group requires at least one required option.
The help text for a command with a co-occuring option group renders that option as (required) despite the entire group being optional. This is confusing for the user.
e.g.:
class Connect : NoOpCliktCommand(name = "connect") {
val clientCertificateStore: ClientCertStoreOptions? by ClientCertStoreOptions().cooccurring()
}
class ClientCertStoreOptions : OptionGroup() {
val clientCertificateStore: Path by option()
.path(mustExist = true, canBeDir = false, mustBeReadable = true)
.required()
val clientCertificateStorePassword: String by option()
.prompt(
text = "Client certificate store password",
hideInput = true,
)
}
mycli connect -h renders:
Usage: mycli connect [<options>]
Options:
--client-certificate-store=<path> (required)
--client-certificate-store-password=<text>
-h, --help Show this message and exit
I think the (required) text in help should be omitted from all options in a co-occurring option group.
A co-occurring option group requires at least one
requiredoption.The help text for a command with a co-occuring option group renders that option as
(required)despite the entire group being optional. This is confusing for the user.e.g.:
mycli connect -hrenders:I think the
(required)text in help should be omitted from all options in a co-occurring option group.