|
|
@ -304,14 +304,21 @@ public class SpringCli {
|
|
|
|
|
|
|
|
|
|
|
|
private void showCommandHints(String starting) {
|
|
|
|
private void showCommandHints(String starting) {
|
|
|
|
for (Command command : SpringCli.this.commands) {
|
|
|
|
for (Command command : SpringCli.this.commands) {
|
|
|
|
if (command.getName().startsWith(starting)
|
|
|
|
if (isHintMatch(command, starting)) {
|
|
|
|
|| (command.isOptionCommand() && ("--" + command.getName())
|
|
|
|
|
|
|
|
.startsWith(starting))) {
|
|
|
|
|
|
|
|
Log.info(command.getName() + " " + command.getDescription());
|
|
|
|
Log.info(command.getName() + " " + command.getDescription());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isHintMatch(Command command, String starting) {
|
|
|
|
|
|
|
|
if (command instanceof HintCommand) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return command.getName().startsWith(starting)
|
|
|
|
|
|
|
|
|| (command.isOptionCommand() && ("--" + command.getName())
|
|
|
|
|
|
|
|
.startsWith(starting));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void showCommandOptionHints(String commandName,
|
|
|
|
private void showCommandOptionHints(String commandName,
|
|
|
|
List<String> specifiedArguments, String starting) {
|
|
|
|
List<String> specifiedArguments, String starting) {
|
|
|
|
Command command = find(commandName);
|
|
|
|
Command command = find(commandName);
|
|
|
|