You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
@dbear496 thank you for raising this.
I agree this is confusing. I believe the truth table is correct. It is no longer the case that the value is toggled from the default.
The docs should be modified to clarify that the negated form (for example, --no-verbose) sets the value to false, while the regular form (for example, --verbose) sets the value to true.
Will you be able to provide a pull request with a doc (docs/index.adoc) fix?
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:
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 adefaultValue
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.The text was updated successfully, but these errors were encountered: