Skip to content

Documentation unclear re. default for negatable options #2217

@dbear496

Description

@dbear496

I am new to picocli, so I'm perusing the documentation to see how I can use it in my project. I came across the following section on negatable options which is a bit unclear:

Screenshot_20240227_103009

This clearly states, "If the negated form of the option is found, for example --no-verbose, the value is set to the provided default. Otherwise, with a regular call, for example --verbose, it is set to the opposite of the default." However, the truth table that follows seems to indicate the exact opposite: when --backup has a defaultValue true, then --no-backup sets the value to false, and --backup sets the value to true. Which is it? It looks like these are contradicting.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions