Fix alias usage in help command
- Add info about aliases into model structure used by help command templating. - Add some tests to models. - Change help commands list to group command and its aliases together. - Change help command to show aliases. - Fixes #458 - Fixes #426
This commit is contained in:
@@ -23,7 +23,9 @@ import org.springframework.shell.standard.ShellMethod;
|
||||
@ShellComponent
|
||||
public class AliasCommands {
|
||||
|
||||
@ShellMethod(key = { "alias anno main1", "alias anno main2" }, group = "Alias Commands")
|
||||
private final static String DESCRIPTION = "main1 with main2 as alias";
|
||||
|
||||
@ShellMethod(key = { "alias anno main1", "alias anno main2" }, group = "Alias Commands", value = DESCRIPTION)
|
||||
public String annoMain1() {
|
||||
return "Hello annoMain1";
|
||||
}
|
||||
@@ -33,6 +35,7 @@ public class AliasCommands {
|
||||
return CommandRegistration.builder()
|
||||
.command("alias", "reg", "main1")
|
||||
.group("Alias Commands")
|
||||
.description(DESCRIPTION)
|
||||
.withAlias()
|
||||
.command("alias", "reg", "main2")
|
||||
.group("Alias Commands")
|
||||
|
||||
Reference in New Issue
Block a user