From a823dc3a31a482173eeefd119ff65f4a01888b7c Mon Sep 17 00:00:00 2001 From: Alex Duan <51781608+DuanKuanJun@users.noreply.github.com> Date: Wed, 21 Aug 2024 21:10:44 +0800 Subject: [PATCH] Update shellEngine.c --- tools/shell/src/shellEngine.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 0ccbd683dc..6fd5f7402f 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -164,11 +164,13 @@ int32_t shellRunCommand(char *command, bool recordHistory) { } // add help or help; - if (strncasecmp(command, "help;", 5) == 0) { - showHelp(); - return 0; + if (strncasecmp(command, "help", 4) == 0) { + if(command[4] == ';' || command[4] == ' ' || command[4] == 0) { + showHelp(); + return 0; + } } - + if (recordHistory) shellRecordCommandToHistory(command); char quote = 0, *cmd = command;