]> git.saurik.com Git - redis.git/blobdiff - redis-cli.c
Now list push commands return the length of the new list, thanks to Gustavo Picon
[redis.git] / redis-cli.c
index 82c2f1b3b2e07bcc959b62161bd4123d88b116f3..14b24f7538eb6365e20ad794efe8aae3622f39b0 100644 (file)
@@ -65,6 +65,7 @@ static struct redisCommand cmdTable[] = {
     {"set",3,REDIS_CMD_BULK},
     {"setnx",3,REDIS_CMD_BULK},
     {"append",3,REDIS_CMD_BULK},
+    {"substr",4,REDIS_CMD_INLINE},
     {"del",-2,REDIS_CMD_INLINE},
     {"exists",2,REDIS_CMD_INLINE},
     {"incr",2,REDIS_CMD_INLINE},
@@ -101,6 +102,7 @@ static struct redisCommand cmdTable[] = {
     {"zrem",3,REDIS_CMD_BULK},
     {"zremrangebyscore",4,REDIS_CMD_INLINE},
     {"zrange",-4,REDIS_CMD_INLINE},
+    {"zrank",3,REDIS_CMD_BULK},
     {"zrangebyscore",-4,REDIS_CMD_INLINE},
     {"zcount",4,REDIS_CMD_INLINE},
     {"zrevrange",-4,REDIS_CMD_INLINE},
@@ -440,11 +442,8 @@ static char *prompt(char *line, int size) {
         printf(">> ");
         retval = fgets(line, size, stdin);
     } while (retval && *line == '\n');
-
     line[strlen(line) - 1] = '\0';
 
-    fpurge(stdin);
-
     return retval;
 }