summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/redis-cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 1f80bc615..372d02d97 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1386,8 +1386,9 @@ static void repl(void) {
/* Only use history and load the rc file when stdin is a tty. */
if (isatty(fileno(stdin))) {
historyfile = getDotfilePath(REDIS_CLI_HISTFILE_ENV,REDIS_CLI_HISTFILE_DEFAULT);
+ //keep in-memory history always regardless if history file can be determined
+ history = 1;
if (historyfile != NULL) {
- history = 1;
linenoiseHistoryLoad(historyfile);
}
cliLoadPreferences();