summaryrefslogtreecommitdiff
path: root/src/redis-cli.c
diff options
context:
space:
mode:
authorItamar Haber <itamar@redislabs.com>2019-10-31 15:45:52 +0200
committerItamar Haber <itamar@redislabs.com>2019-10-31 15:45:52 +0200
commit9f32d0eed2695422c828eeeebf8f695285022ef7 (patch)
treeaf1e1198c7c8ece31ae1036739a32a37d90c49c6 /src/redis-cli.c
parent764b420f5fddfe177638828a43c921eb949b140c (diff)
downloadredis-9f32d0eed2695422c828eeeebf8f695285022ef7.tar.gz
Ommits from redis-cli's history
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r--src/redis-cli.c8
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);
}