Change help to description in command registration

- Fixes #421
This commit is contained in:
Janne Valkealahti
2022-05-18 08:59:57 +01:00
parent c7d3eb15b4
commit baf8346063
10 changed files with 58 additions and 73 deletions

View File

@@ -26,7 +26,7 @@ public class FunctionCommands {
public CommandRegistration commandRegistration1() {
return CommandRegistration.builder()
.command("function", "command1")
.help("function sample")
.description("function sample")
.group("Function Commands")
.withTarget()
.function(ctx -> {
@@ -44,7 +44,7 @@ public class FunctionCommands {
public CommandRegistration commandRegistration2() {
return CommandRegistration.builder()
.command("function", "command2")
.help("function sample")
.description("function sample")
.group("Function Commands")
.withTarget()
.function(ctx -> {
@@ -73,7 +73,7 @@ public class FunctionCommands {
public CommandRegistration commandRegistration3() {
return CommandRegistration.builder()
.command("function", "command3")
.help("function sample")
.description("function sample")
.group("Function Commands")
.withTarget()
.consumer(ctx -> {
@@ -92,7 +92,7 @@ public class FunctionCommands {
public CommandRegistration commandRegistration4() {
return CommandRegistration.builder()
.command("function", "command4")
.help("function sample")
.description("function sample")
.group("Function Commands")
.withTarget()
.consumer(ctx -> {

View File

@@ -37,14 +37,14 @@ public class RegisterCommands extends AbstractShellComponent {
registered1 = CommandRegistration.builder()
.command("register registered1")
.group(GROUP)
.help("registered1 command")
.description("registered1 command")
.withTarget()
.method(pojoMethods, "registered1")
.and()
.build();
registered2 = CommandRegistration.builder()
.command("register registered2")
.help("registered2 command")
.description("registered2 command")
.group(GROUP)
.withTarget()
.method(pojoMethods, "registered2")
@@ -55,7 +55,7 @@ public class RegisterCommands extends AbstractShellComponent {
.build();
registered3 = CommandRegistration.builder()
.command("register registered3")
.help("registered3 command")
.description("registered3 command")
.group(GROUP)
.withTarget()
.method(pojoMethods, "registered3")
@@ -84,7 +84,7 @@ public class RegisterCommands extends AbstractShellComponent {
};
CommandRegistration registration = CommandRegistration.builder()
.command(command)
.help("registered4 command")
.description("registered4 command")
.group(GROUP)
.withTarget()
.function(function)

View File

@@ -90,7 +90,7 @@ public class ResolvedCommands {
CommandRegistration resolved1 = CommandRegistration.builder()
.command("resolve server1 command1")
.group(GROUP)
.help("server1 command1")
.description("server1 command1")
.withTarget()
.function(ctx -> {
return "hi from server1 command1";
@@ -115,7 +115,7 @@ public class ResolvedCommands {
CommandRegistration resolved1 = CommandRegistration.builder()
.command("resolve server2 command1")
.group(GROUP)
.help("server2 command1")
.description("server2 command1")
.withTarget()
.function(ctx -> {
return "hi from server2 command1";
@@ -125,7 +125,7 @@ public class ResolvedCommands {
CommandRegistration resolved2 = CommandRegistration.builder()
.command("resolve server2 command2")
.group(GROUP)
.help("server2 command2")
.description("server2 command2")
.withTarget()
.function(ctx -> {
return "hi from server2 command2";