diff options
author | Itamar Haber <itamar@redislabs.com> | 2019-10-31 15:45:52 +0200 |
---|---|---|
committer | Itamar Haber <itamar@redislabs.com> | 2019-10-31 15:45:52 +0200 |
commit | 9f32d0eed2695422c828eeeebf8f695285022ef7 (patch) | |
tree | af1e1198c7c8ece31ae1036739a32a37d90c49c6 /src/redis-cli.c | |
parent | 764b420f5fddfe177638828a43c921eb949b140c (diff) | |
download | redis-9f32d0eed2695422c828eeeebf8f695285022ef7.tar.gz |
Ommits from redis-cli's history
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r-- | src/redis-cli.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index c67663c23..b421344fa 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1945,8 +1945,12 @@ static void repl(void) { } } - /* Won't save auth command in history file */ - if (!(argv && argc > 0 && !strcasecmp(argv[0+skipargs], "auth"))) { + /* Won't save auth or acl setuser commands in history file */ + if (!(argv && argc > 0 && + (!strcasecmp(argv[0+skipargs], "auth") || + (skipargs + 1 < argc && + !strcasecmp(argv[0+skipargs], "acl") && + !strcasecmp(argv[0+skipargs+1], "setuser"))))) { if (history) linenoiseHistoryAdd(line); if (historyfile) linenoiseHistorySave(historyfile); } |