summaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-20 14:07:28 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:29 -0800
commitd107f71c5079dbe2a023276367b805397d1245c4 (patch)
treeb2d2d9f445515ed8f96ed41c22a992b5c7868883 /src/helper/command.h
parent2461855494cd045567c15c502ba215caffb37ce3 (diff)
downloadopenocd+libswd-d107f71c5079dbe2a023276367b805397d1245c4.tar.gz
openocd+libswd-d107f71c5079dbe2a023276367b805397d1245c4.tar.bz2
openocd+libswd-d107f71c5079dbe2a023276367b805397d1245c4.tar.xz
openocd+libswd-d107f71c5079dbe2a023276367b805397d1245c4.zip
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.
Diffstat (limited to 'src/helper/command.h')
-rw-r--r--src/helper/command.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helper/command.h b/src/helper/command.h
index 1afaeeaa..7baa92d5 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -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.