openocd/src/helper
Andreas Fritiofson c0b8e605f7 command: Fix confusing syntax error message
If the user executes a command with an invalid subcommand, the error
message is extremely unhelpful:

> flash write test.elf
flash write test.elf: command requires more arguments

This is because any command line that starts with a valid command group is
classified as a group, triggering ocd_bouncer to print the confusing
message.

Fix by requiring that to be a command group, the command line must not
contain any unknown tokens after the last valid (sub-)command group. That
is OK because command groups don't have handlers defined and thus can't
take any parameters.

Also fix the error message for "unknown" type to be similar to the error
message that is printed (by Jim) for non-existent primary commands.

Change-Id: I26950349f0909fd3961c4f9ab9b198c221cea9fc
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2285
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22 19:40:38 +00:00
..
bin2char.sh Fix some problems with the bin2char utility 2014-08-02 09:01:32 +00:00
binarybuffer.c binarybuffer: Remove unnecessary cast and fix hidden "bug" 2013-10-31 20:45:26 +00:00
binarybuffer.h binarybuffer: Remove unnecessary cast and fix hidden "bug" 2013-10-31 20:45:26 +00:00
command.c command: Fix confusing syntax error message 2014-09-22 19:40:38 +00:00
command.h Update to the current Jim Tcl 2014-05-09 20:12:17 +00:00
configuration.c Remove unnecessary casts 2013-10-31 20:43:27 +00:00
configuration.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
fileio.c Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
fileio.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
ioutil_stubs.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
ioutil.c ioutil: Remove unnecessary casts and fix const-discarding 2013-10-31 20:45:34 +00:00
ioutil.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
jim-nvp.c build: cleanup src/helper directory 2012-02-06 10:49:52 +00:00
jim-nvp.h build: cleanup src/helper directory 2012-02-06 10:49:52 +00:00
list.h Add a bit-level transfer queue 2012-07-06 14:58:25 +00:00
log.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
log.h stlink_usb: Fix swallowed error on read/write operations, add retries on SWD WAIT, clean up error debug output. 2014-08-11 22:34:52 +00:00
Makefile.am Provide od+sed replacement for the bin2char helper 2014-08-02 09:00:28 +00:00
options.c Removed limit on lenght of command line options. 2014-08-12 21:04:27 +00:00
replacements.c Don't cast return value of [cm]alloc 2014-03-30 03:53:45 +00:00
replacements.h libusb1_common, ftdi: clarify libusb_open error message 2013-06-12 14:40:16 +00:00
startup.tcl command: Fix confusing syntax error message 2014-09-22 19:40:38 +00:00
system.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
time_support_common.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
time_support.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
time_support.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
types.h swd: Improve parity calculation and move it to types.h 2014-06-28 09:27:19 +00:00
util.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
util.h update files to correct FSF address 2013-06-05 19:52:42 +00:00