mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
always enable command history in redis-cli
- when redis-cli is running in a TTY - always enable command history buffering, regardless if history file path can be successfully determined
This commit is contained in:
parent
9f4d4eef8f
commit
1fade3d3b6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user