Merge pull request #27375 from taosdata/fix/TD-31584-3.0

Update shellEngine.c
This commit is contained in:
Alex Duan 2024-08-22 09:09:25 +08:00 committed by GitHub
commit c7a0564272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -585,7 +585,7 @@ void showHelp() {
balance vgroup ;\n\
balance vgroup leader on <vgroup_id> \n\
compact database <db_name>; \n\
crate view <view_name> as select ...\n\
create view <view_name> as select ...\n\
redistribute vgroup <vgroup_id> dnode <dnode_id> ;\n\
split vgroup <vgroup_id>;\n\
show compacts;\n\

View File

@ -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;