WallShell
An easy-to-use, highly portable, CLI using C99.
|
General help structure. More...
Data Fields | |
const char * | commandName |
Name of the command. | |
const char * | description |
Description of the command. | |
const char ** | commands |
Commands that are a subset of this command/topic. | |
const int | commands_count |
Amount of commands in the commands part of this structure. More... | |
const char ** | aliases |
Any aliases that this command has. More... | |
const int | aliases_count |
Amount of commands in the aliases part of this structure. More... | |
General help structure.
Makes printing help menu entries consistent across different functions. Not all fields have to be filled in. You can leave fields as NULL
to not print them. This is meant for general command help entries, mostly meaning first level commands (like clear, exit, etc.)
This is often used to define "Categories". Say you have several time functions. Each one could set it's help function to the same thing, which in turn prints this structure listing out all time
commands. You can also use it to show sub-commands in a similar way. Using git as an example, you could have help git
print this structure, while listing things like git branch
under the commands part of this struct.
Meant to be used with ws_printGeneralHelp().
aliases |
Any aliases that this command has.
aliases
array that you used when creating the ws_command_t related to this command. aliases_count |
Amount of commands in the aliases
part of this structure.
It's the count, not the indexes.
commands_count |
Amount of commands in the commands
part of this structure.
It's the count, not the indexes.