From 5f65f9e2342d3a97884d8450b5311afb81dc86c4 Mon Sep 17 00:00:00 2001 From: Le Roux Bodenstein Date: Mon, 7 Oct 2024 13:26:27 +0100 Subject: [PATCH] WIP --- packages/cli-repl/src/mongosh-repl.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/cli-repl/src/mongosh-repl.ts b/packages/cli-repl/src/mongosh-repl.ts index 8903db2ab..805349dac 100644 --- a/packages/cli-repl/src/mongosh-repl.ts +++ b/packages/cli-repl/src/mongosh-repl.ts @@ -516,7 +516,17 @@ class MongoshNodeRepl implements EvaluationListener { // the multiline input are replaced at this point. const newHistoryEntry = makeMultilineJSIntoSingleLine(ev.input); if (newHistoryEntry.length > 0) { - originalHistory.unshift(newHistoryEntry); + const newLines = [newHistoryEntry]; + /* + changeHistory( + newLines, + this.redactHistory === 'remove-redact' + ? 'redact-sensitive-data' + : 'keep-sensitive-data' + ); + */ + + originalHistory.unshift(...newLines); } history.splice(0, history.length, ...originalHistory); originalHistory = null;