From 2f4d2242ea886666e33482069d69afe6df4ed701 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 3 Mar 2010 14:41:47 +0100 Subject: [PATCH] added quit and exit commands to redis-cli in order to quit the interactive mode --- redis-cli.c | 2 ++ 1 file changed, 2 insertions(+) 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++; } -- 2.45.2