summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-04-30 13:42:25 +0200
committerantirez <antirez@gmail.com>2020-04-30 13:42:25 +0200
commit684c5907dd8bc481470a45e5b1b1fc3beaa24cb7 (patch)
tree18129eb466d3afc1c02fb1c21038970e8be46bdb
parent6fcdf75325e4be85687571b50ae4017329b32bfd (diff)
downloadredis-684c5907dd8bc481470a45e5b1b1fc3beaa24cb7.tar.gz
redis-cli: fix hints with subcommands.
-rw-r--r--src/redis-cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index ec0f58f5f..880f3d70a 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -699,7 +699,8 @@ static char *hintsCallback(const char *buf, int *color, int *bold) {
for (i = 0; i < helpEntriesLen; i++) {
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;
*bold = 0;