Commit 8ea185ea authored by antirez's avatar antirez
Browse files

redis-cli: AUTH can now have 3 arguments as well.

parent bb7546c9
...@@ -1222,7 +1222,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) { ...@@ -1222,7 +1222,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) { if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) {
config.dbnum = atoi(argv[1]); config.dbnum = atoi(argv[1]);
cliRefreshPrompt(); cliRefreshPrompt();
} else if (!strcasecmp(command,"auth") && argc == 2) { } else if (!strcasecmp(command,"auth") && (argc == 2 || argc == 3))
{
cliSelect(); cliSelect();
} }
} }
......
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