Unverified Commit 0b1b9edb authored by Huang Zhw's avatar Huang Zhw Committed by GitHub
Browse files

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.
parent 9c927e9d
...@@ -656,7 +656,7 @@ static void cliOutputHelp(int argc, char **argv) { ...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment