X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fhelper%2Fcommand.c;h=9fc78422c7c52d6da74cccf718bb8940f53726f1;hp=00d4b356150abe31a5ea40b82847a8fa490617b0;hb=b9628accd6da0aef6a9fc03efb96e05afab99c99;hpb=335f667d4433e8ca3a57e813fd128b78d8b364d2 diff --git a/src/helper/command.c b/src/helper/command.c index 00d4b35615..9fc78422c7 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); }