Skip to content

Commit

Permalink
[#1409][#1463] DOC: more minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Nov 17, 2021
1 parent de9df3e commit 2857f7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3052,7 +3052,8 @@ Picocli will not initialize the `@ArgGroup`-annotated field (and so no default v

==== Showing Default Values in Group Usage Help

When options are used in argument groups, they should define default values via the `@Option(defaultValue = "...")` annotation (initial values in the field declaration cannot be shown in the usage help).
When options are used in argument groups, they should define default values via the `@Option(defaultValue = "...")` annotation.
Picocli cannot get the initial values from the option field declaration because the group has not been instantiated yet.

When default values are defined in the annotation, the `${DEFAULT-VALUE}` variable can be used to <<Show Default Values,show the default value>> in the description of options in an argument group. For example:

Expand Down

0 comments on commit 2857f7c

Please sign in to comment.