Add command group and group output of help command

Resolves #135
This commit is contained in:
Roland Weisleder
2017-09-23 15:33:57 +02:00
parent b21a1f16f1
commit e4e6471f27
6 changed files with 93 additions and 27 deletions

View File

@@ -125,6 +125,12 @@ public class HelpTest {
methodTarget = MethodTarget.of("thirdCommand", commands(), "The last command.");
result.put("third-command", methodTarget);
methodTarget = MethodTarget.of("firstCommandInGroup", commands(), "The first command in a separate group.", "Example Group");
result.put("first-group-command", methodTarget);
methodTarget = MethodTarget.of("secondCommandInGroup", commands(), "The second command in a separate group.", "Example Group");
result.put("second-group-command", methodTarget);
return result;
};
}
@@ -169,5 +175,15 @@ public class HelpTest {
}
@ShellMethod
public void firstCommandInGroup() {
}
@ShellMethod
public void secondCommandInGroup() {
}
}
}

View File

@@ -1,6 +1,11 @@
AVAILABLE COMMANDS&
&
Default&
1st-command, first-command: A rather extensive description of some command.&
second-command, yet-another-command: The second command. This one is known under several aliases as well.&
third-command: The last command.&
&
Example Group&
first-group-command: The first command in a separate group.&
second-group-command: The second command in a separate group.&
&