提交 63feb93a 编写于 作者: A antirez

COMMAND COUNT subcommand added.

上级 0a6649a7
......@@ -2330,8 +2330,10 @@ void commandCommand(redisClient *c) {
for (i = 2; i < c->argc; i++) {
addReplyCommand(c, dictFetchValue(server.commands, c->argv[i]->ptr));
}
} else if (!strcasecmp(c->argv[1]->ptr, "count") && c->argc == 2) {
addReplyLongLong(c, dictSize(server.commands));
} else {
addReplyError(c, "Unknown subcommand.");
addReplyError(c, "Unknown subcommand or wrong number of arguments.");
return;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册