From b9628accd6da0aef6a9fc03efb96e05afab99c99 Mon Sep 17 00:00:00 2001
From: drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Date: Mon, 12 Jun 2006 16:49:49 +0000
Subject: - the 'help' command now takes an optional argument to display help
 only on a certain command (thanks to Andrew Dyer for this enhancement) -
 OpenOCD now includes the ability to diassemble instructions on its own (only
 ARM for now, Thumb might follow). The command is "armv4_5 disassemble
 <address> <count> ['thumb']" (thumb is currently unsupported). I've compared
 the produced disassembly against GDB/GNU Objdump output, and it seems to be
 correct, but there may still be some bugs left.

git-svn-id: svn://svn.berlios.de/openocd/trunk@68 b42882b7-edfa-0310-969c-e2dbd0fdcd60
---
 src/helper/command.c | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'src/helper')

diff --git a/src/helper/command.c b/src/helper/command.c
index 00d4b356..9fc78422 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -443,6 +443,15 @@ int command_print_help(command_context_t* context, char* name, char** args, int
 
 	for (c = context->commands; c; c = c->next)
 	{
+		if (argc == 1)
+		{
+			 if (strncasecmp(c->name, args[0], c->unique_len))
+				 continue;
+
+			 if (strncasecmp(c->name, args[0], strlen(args[0])))
+				 continue;
+		} 
+
 		command_print_help_line(context, c, 0);
 	}
 	
-- 
cgit v1.2.3