Improve redis-cli help. When help command, we only match command (#8879)

prefix args not all args. So when we help commands with subcommands,
all subcommands will be output.
This commit is contained in:
Huang Zhw 2021-04-29 17:08:52 +08:00 committed by GitHub
parent 9c927e9de9
commit 0b1b9edb28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ static void cliOutputHelp(int argc, char **argv) {
help = entry->org; help = entry->org;
if (group == -1) { if (group == -1) {
/* Compare all arguments */ /* Compare all arguments */
if (argc == entry->argc) { if (argc <= entry->argc) {
for (j = 0; j < argc; j++) { for (j = 0; j < argc; j++) {
if (strcasecmp(argv[j],entry->argv[j]) != 0) break; if (strcasecmp(argv[j],entry->argv[j]) != 0) break;
} }