Commit 2f4d2242 authored by antirez's avatar antirez
Browse files

added quit and exit commands to redis-cli in order to quit the interactive mode

parent 52d23ddb
...@@ -460,6 +460,8 @@ static void repl() { ...@@ -460,6 +460,8 @@ static void repl() {
for (ap = args; (*ap = strsep(&line, " \t")) != NULL;) { for (ap = args; (*ap = strsep(&line, " \t")) != NULL;) {
if (**ap != '\0') { if (**ap != '\0') {
if (argc >= max) break; if (argc >= max) break;
if (strcasecmp(*ap,"quit") == 0 || strcasecmp(*ap,"exit") == 0)
exit(0);
ap++; ap++;
argc++; argc++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment