]> git.saurik.com Git - redis.git/commitdiff
added quit and exit commands to redis-cli in order to quit the interactive mode
authorantirez <antirez@gmail.com>
Wed, 3 Mar 2010 13:41:47 +0000 (14:41 +0100)
committerantirez <antirez@gmail.com>
Wed, 3 Mar 2010 13:41:47 +0000 (14:41 +0100)
redis-cli.c

index c869972afbd12bbd5fd82ed335e7217d5dca84de..82c2f1b3b2e07bcc959b62161bd4123d88b116f3 100644 (file)
@@ -460,6 +460,8 @@ static void repl() {
         for (ap = args; (*ap = strsep(&line, " \t")) != NULL;) {
             if (**ap != '\0') {
                 if (argc >= max) break;
+                if (strcasecmp(*ap,"quit") == 0 || strcasecmp(*ap,"exit") == 0)
+                    exit(0);
                 ap++;
                 argc++;
             }