summaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-19 06:48:37 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-20 14:52:56 -0800
commit5458fef43ca7072312440301a9469c686ca641e2 (patch)
tree27cff5537d233c504138e5065621bd04e32dc868 /src/helper/command.h
parent82449e2d60fbbb5ce8a6285b6e6d60e5767ee429 (diff)
downloadopenocd+libswd-5458fef43ca7072312440301a9469c686ca641e2.tar.gz
openocd+libswd-5458fef43ca7072312440301a9469c686ca641e2.tar.bz2
openocd+libswd-5458fef43ca7072312440301a9469c686ca641e2.tar.xz
openocd+libswd-5458fef43ca7072312440301a9469c686ca641e2.zip
improve 'help' command
Rewrites 'help' command in C, using new 'cmd_help' for display. Adds the built-in 'help' COMMAND_HANDLER to provide better output than the TCL-based script command (e.g. heirarchical listing of commands). The help string is stored in the command structure, though it conitnues to be pushed into the Jim environment. The current idiomatic usage suggests the addition of a usage field as well, to provide two levels of detail for users to consume (i.e. terse usage list, or verbose help).
Diffstat (limited to 'src/helper/command.h')
-rw-r--r--src/helper/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helper/command.h b/src/helper/command.h
index a7b422ad..837b4bdd 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -159,6 +159,7 @@ typedef __COMMAND_HANDLER((*command_handler_t));
struct command
{
char *name;
+ const char *help;
struct command *parent;
struct command *children;
command_handler_t handler;