add command usage, separate from help

Adds the usage command, to display usage information for commands.
The output for this command will remain erronenously empty until
commands are updated to use these new coventions.
This commit is contained in:
Zachary T Welch
2009-11-20 14:07:28 -08:00
parent 2461855494
commit d107f71c50
2 changed files with 52 additions and 14 deletions

View File

@@ -160,6 +160,7 @@ struct command
{
char *name;
const char *help;
const char *usage;
struct command *parent;
struct command *children;
command_handler_t handler;
@@ -199,6 +200,8 @@ struct command_registration {
command_handler_t handler;
enum command_mode mode;
const char *help;
/// a string listing the options and arguments, required or optional
const char *usage;
};
/// Use this as the last entry in an array of command_registration records.