Skip to content

Commit

Permalink
[remkop#1398][remkop#1400] additional clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop authored and MarkoMackic committed Oct 17, 2021
1 parent c0039ae commit 9ef376a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -3746,7 +3746,8 @@ public enum ScopeType {
* </p>
* <b>A note on boolean options</b>
* <p>
* By default picocli allows boolean options (also called "flags" or "switches") to have an optional parameter.
* By default picocli allows boolean options (also called "flags" or "switches") to have an optional parameter,
* which must be either "true" or "false" (lowercase, other values are rejected).
* You can make a boolean option take a required parameter by annotating your field with {@code arity="1"}.
* For example: </p>
* <pre>&#064;Option(names = "-v", arity = "1") boolean verbose;</pre>
Expand Down

0 comments on commit 9ef376a

Please sign in to comment.