Skip to content

Add Required attribute to ManPageGenertor #2519

Description

@epugh

I am working on migrating to picocli from commons-cli for Apache Solr. One of the exciting enhancements is generating the documentation for commands.

We ran into a problem that in the options documentation we don't distingush required versus optional:

Image

You can see the [ ] work for the synopsis, but not in the individual option docs.

picocli's `ManPageGenerator.writeOption()` ignores `option.required()` entirely. The only signal is the synopsis bracketing — and the synopsis is easy to miss/ignore once you scroll past it.

It would be good to add the option.required() attribute!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions