]> git.saurik.com Git - redis.git/blobdiff - src/redis-cli.c
Re-introduce the interactive field so we can reconnect in interactive mode
[redis.git] / src / redis-cli.c
index 1bd0798b3f695d213096807963a19a0962acd317..33919758ee1da0b08b333c08e2f16c138cfdf1c4 100644 (file)
@@ -56,6 +56,7 @@ static struct config {
     long repeat;
     int dbnum;
     int argn_from_stdin;
+    int interactive;
     int shutdown;
     int monitor_mode;
     int pubsub_mode;
@@ -393,6 +394,7 @@ static void repl() {
     char *line;
     sds *argv;
 
+    config.interactive = 1;
     while((line = linenoise("redis> ")) != NULL) {
         if (line[0] != '\0') {
             argv = sdssplitargs(line,&argc);
@@ -440,6 +442,7 @@ int main(int argc, char **argv) {
     config.repeat = 1;
     config.dbnum = 0;
     config.argn_from_stdin = 0;
+    config.interactive = 0;
     config.shutdown = 0;
     config.monitor_mode = 0;
     config.pubsub_mode = 0;