projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52d23dd
)
added quit and exit commands to redis-cli in order to quit the interactive mode
author
antirez
<antirez@gmail.com>
Wed, 3 Mar 2010 13:41:47 +0000
(14:41 +0100)
committer
antirez
<antirez@gmail.com>
Wed, 3 Mar 2010 13:41:47 +0000
(14:41 +0100)
redis-cli.c
patch
|
blob
|
blame
|
history
diff --git
a/redis-cli.c
b/redis-cli.c
index c869972afbd12bbd5fd82ed335e7217d5dca84de..82c2f1b3b2e07bcc959b62161bd4123d88b116f3 100644
(file)
--- 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++;
}