Update shellEngine.c

This commit is contained in:
Alex Duan 2024-08-21 21:10:44 +08:00 committed by GitHub
parent 9d433926cb
commit a823dc3a31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -164,11 +164,13 @@ int32_t shellRunCommand(char *command, bool recordHistory) {
} }
// add help or help; // add help or help;
if (strncasecmp(command, "help;", 5) == 0) { if (strncasecmp(command, "help", 4) == 0) {
showHelp(); if(command[4] == ';' || command[4] == ' ' || command[4] == 0) {
return 0; showHelp();
return 0;
}
} }
if (recordHistory) shellRecordCommandToHistory(command); if (recordHistory) shellRecordCommandToHistory(command);
char quote = 0, *cmd = command; char quote = 0, *cmd = command;