1 | name = "help";
|
---|
2 |
|
---|
3 | group = "void";
|
---|
4 |
|
---|
5 | shortDescription = "Print list of commands";
|
---|
6 |
|
---|
7 | longDescription = "";
|
---|
8 |
|
---|
9 | argumentTypes = [ "command-or-group-name" ];
|
---|
10 |
|
---|
11 | function execute() {
|
---|
12 | if (arguments.length == 0) {
|
---|
13 | var groups = getCommandGroups();
|
---|
14 | message("List of command categories:");
|
---|
15 | message("");
|
---|
16 | for (var name in groups) {
|
---|
17 | if (name == "void")
|
---|
18 | continue;
|
---|
19 | var data = groups[name];
|
---|
20 | message(name + " :: " + data.shortDescription);
|
---|
21 | }
|
---|
22 | message("");
|
---|
23 | message("Type \"help\" followed by a category name for a list of commands in that category.");
|
---|
24 | message("Type \"help all\" for the list of all commands.");
|
---|
25 | message("Type \"help\" followed by a command name for full documentation.");
|
---|
26 | message("Command name abbreviations are allowed if they are unambiguous.");
|
---|
27 | } else {
|
---|
28 | var arg = arguments[0];
|
---|
29 | if (arg == "all") {
|
---|
|
---|