Skip to content

Commit

Permalink
[#1696] Fix asciidoc output for nested ArgGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden authored and remkop committed Jun 6, 2022
1 parent 1128dcf commit bb05724
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static void genOptions(PrintWriter pw, CommandSpec spec) {
IParameterRenderer parameterRenderer = spec.commandLine().getHelp().createDefaultParameterRenderer();

List<ArgGroupSpec> groups = optionListGroups(spec);
for (ArgGroupSpec group : groups) { options.removeAll(group.options()); }
for (ArgGroupSpec group : groups) { options.removeAll(group.allOptionsNested()); }

if (options.isEmpty() && !spec.usageMessage().showEndOfOptionsDelimiterInUsageHelp()) {
pw.printf("// tag::picocli-generated-man-section-options[]%n");
Expand Down Expand Up @@ -534,12 +534,12 @@ static void genOptions(PrintWriter pw, CommandSpec spec) {
String heading = makeHeading(group.heading(), "Options Group");
pw.printf("== %s%n", COLOR_SCHEME.text(heading));

for (PositionalParamSpec positional : group.positionalParameters()) {
for (PositionalParamSpec positional : group.allPositionalParametersNested()) {
if (!positional.hidden()) {
writePositional(pw, positional, parameterRenderer, paramLabelRenderer);
}
}
List<OptionSpec> groupOptions = new ArrayList<OptionSpec>(group.options());
List<OptionSpec> groupOptions = new ArrayList<OptionSpec>(group.allOptionsNested());
if (optionSort != null) {
Collections.sort(groupOptions, optionSort);
}
Expand Down

0 comments on commit bb05724

Please sign in to comment.