Skip to content

Commit 47818d8

Browse files
committed
Fix command description
- Align default value between declarative and programmatic approaches - Remove unnecessary help display in command completion Resolves #1236
1 parent 1d91365 commit 47818d8

File tree

2 files changed

+3
-3
lines changed
  • spring-shell-core/src/main/java/org/springframework/shell/core/command
  • spring-shell-jline/src/main/java/org/springframework/shell/jline

2 files changed

+3
-3
lines changed

spring-shell-core/src/main/java/org/springframework/shell/core/command/Command.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ default String getName() {
5252
* @return the description of the command
5353
*/
5454
default String getDescription() {
55-
return "";
55+
return "N/A";
5656
}
5757

5858
/**
@@ -137,7 +137,7 @@ final class Builder {
137137

138138
private String name = "";
139139

140-
private String description = "";
140+
private String description = "N/A";
141141

142142
private String group = "";
143143

spring-shell-jline/src/main/java/org/springframework/shell/jline/CommandCompleter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void complete(LineReader reader, ParsedLine line, List<Candidate> candida
6565
else {
6666
for (Command command : this.commandRegistry.getCommands()) {
6767
candidates.add(new Candidate(command.getName(), command.getName() + ": " + command.getDescription(),
68-
command.getGroup(), command.getHelp(), null, null, true));
68+
command.getGroup(), null, null, null, true));
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)