From 51fcb79d96b05fdfb5627eb1199fa17850d7acca Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 29 May 2019 12:05:33 +0200 Subject: [PATCH] Remove read history This was undocumented, not all that useful and potentially unwanted. In particular it means that things like mysql -p(read) will still keep the password in history. Also it allows us to simply implement asking for the history deletion term. See #5791. --- src/builtin_read.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/builtin_read.cpp b/src/builtin_read.cpp index 1e32d62c3..81205d661 100644 --- a/src/builtin_read.cpp +++ b/src/builtin_read.cpp @@ -202,10 +202,8 @@ static int read_interactive(parser_t &parser, wcstring &buff, int nchars, bool s const wchar_t *commandline) { int exit_res = STATUS_CMD_OK; - const auto &vars = parser.vars(); - wcstring read_history_ID = history_session_id(vars); - if (!read_history_ID.empty()) read_history_ID += L"_read"; - reader_push(parser, read_history_ID); + // Don't keep history + reader_push(parser, L""); reader_set_left_prompt(prompt); reader_set_right_prompt(right_prompt);