summaryrefslogtreecommitdiff
path: root/src/helper/startup.tcl
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/startup.tcl
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/startup.tcl')
-rw-r--r--src/helper/startup.tcl18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl
index 30dc184f..ddfef1dc 100644
--- a/src/helper/startup.tcl
+++ b/src/helper/startup.tcl
@@ -58,24 +58,6 @@ proc cmd_help {cmdname h indent} {
}
}
-#Print help text for a command. Word wrap
-#help text that is too wide inside column.
-proc help {args} {
- global ocd_helptext
- set cmd $args
- foreach a [lsort $ocd_helptext] {
- if {[string length $cmd] == 0 || \
- [string first $cmd $a] != -1 || \
- [string first $cmd [lindex $a 1]] != -1} \
- {
- cmd_help [lindex $a 0] [lindex $a 1] 0
- }
- }
-}
-
-add_help_text help "Tcl implementation of help command"
-
-
# If a fn is unknown to Tcl, we try to execute it as an OpenOCD command
#
# We also support two level commands. "flash banks" is translated to