From: antirez Date: Wed, 3 Mar 2010 13:41:47 +0000 (+0100) Subject: added quit and exit commands to redis-cli in order to quit the interactive mode X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/2f4d2242ea886666e33482069d69afe6df4ed701 added quit and exit commands to redis-cli in order to quit the interactive mode --- diff --git a/redis-cli.c b/redis-cli.c index c869972a..82c2f1b3 100644 --- a/redis-cli.c +++ b/redis-cli.c @@ -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++; }