(cmd)
| 897 | } |
| 898 | |
| 899 | function helpCommand(cmd) { |
| 900 | if (!cmd) { |
| 901 | _printCommandsList(); |
| 902 | } else { |
| 903 | var cmdGroups = _groupCommands(); |
| 904 | var command = cmdGroups.find(c => c.aliases.includes(cmd)); |
| 905 | |
| 906 | if (command && command.helpText) |
| 907 | _printCommand(command); |
| 908 | else |
| 909 | print(`No help found for ${cmd} command`); |
| 910 | } |
| 911 | } |
| 912 | helpCommand.summary = 'Show help for the specified command else list all commands'; |
| 913 | helpCommand.helpText = `USAGE |
| 914 | help [command] |
nothing calls this directly
no test coverage detected