Skip to content

Commit

Permalink
revert the rename and keep the plural
Browse files Browse the repository at this point in the history
  • Loading branch information
peutch committed May 2, 2021
1 parent 5b95450 commit 25a39bb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"allDeclaredMethods" : true,
"allPublicMethods" : true,
"fields" : [
{ "name" : "command" },
{ "name" : "commands" },
{ "name" : "helpRequested" }
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"allDeclaredMethods" : true,
"allPublicMethods" : true,
"fields" : [
{ "name" : "command" },
{ "name" : "commands" },
{ "name" : "helpRequested" }
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"allDeclaredMethods" : true,
"allPublicMethods" : true,
"fields" : [
{ "name" : "command" },
{ "name" : "commands" },
{ "name" : "helpRequested" }
]
},
Expand Down
2 changes: 1 addition & 1 deletion picocli-codegen/src/test/resources/example-reflect.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"allDeclaredMethods" : true,
"allPublicMethods" : true,
"fields" : [
{ "name" : "command" },
{ "name" : "commands" },
{ "name" : "helpRequested" }
]
},
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -14753,7 +14753,7 @@ public static final class HelpCommand implements IHelpCommandInitializable, IHel

@Parameters(paramLabel = "COMMAND", arity="0..1", descriptionKey = "helpCommand.command",
description = "The COMMAND to display the usage help message for.")
private String command;
private String commands;

private CommandLine self;
private PrintStream out;
Expand All @@ -14768,9 +14768,9 @@ public void run() {
CommandLine parent = self == null ? null : self.getParent();
if (parent == null) { return; }
Help.ColorScheme colors = colorScheme != null ? colorScheme : Help.defaultColorScheme(ansi);
if (command != null) {
if (commands != null) {
Map<String, CommandLine> parentSubcommands = parent.getCommandSpec().subcommands();
String fullName = command;
String fullName = commands;
if (parent.isAbbreviatedSubcommandsAllowed()) {
fullName = AbbreviationMatcher.match(parentSubcommands.keySet(), fullName,
parent.isSubcommandsCaseInsensitive(), self);
Expand All @@ -14783,7 +14783,7 @@ public void run() {
subcommand.usage(out, colors); // for compatibility with pre-4.0 clients
}
} else {
throw new ParameterException(parent, "Unknown subcommand '" + command + "'.", null, command);
throw new ParameterException(parent, "Unknown subcommand '" + commands + "'.", null, commands);
}
} else {
if (outWriter != null) {
Expand Down

0 comments on commit 25a39bb

Please sign in to comment.