redis-cli: fix hints with subcommands.

This commit is contained in:
antirez 2020-04-30 13:42:25 +02:00
parent 455d8a05c1
commit 3fcffe7d04

View File

@ -699,7 +699,8 @@ static char *hintsCallback(const char *buf, int *color, int *bold) {
for (i = 0; i < helpEntriesLen; i++) { for (i = 0; i < helpEntriesLen; i++) {
if (!(helpEntries[i].type & CLI_HELP_COMMAND)) continue; if (!(helpEntries[i].type & CLI_HELP_COMMAND)) continue;
if (strcasecmp(argv[0],helpEntries[i].full) == 0) if (strcasecmp(argv[0],helpEntries[i].full) == 0 ||
strcasecmp(buf,helpEntries[i].full) == 0)
{ {
*color = 90; *color = 90;
*bold = 0; *bold = 0;