From 5cb43772dc26cceddc3496ce99ba3b944f49a8e2 Mon Sep 17 00:00:00 2001 From: Johannes Baiter Date: Tue, 14 Feb 2023 08:14:05 +0100 Subject: Add `history_filter` cfg to exclude commands from history (#515) (#716) Adds a new `history_filter` setting through which users can specify a list of regular expressions that match commands that should not be recorded in the history. --- src/command/client/history.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/command/client/history.rs') diff --git a/src/command/client/history.rs b/src/command/client/history.rs index 34b851d9..7382eba6 100644 --- a/src/command/client/history.rs +++ b/src/command/client/history.rs @@ -175,7 +175,7 @@ impl Cmd { Self::Start { command: words } => { let command = words.join(" "); - if command.starts_with(' ') { + if command.starts_with(' ') || settings.history_filter.is_match(&command) { return Ok(()); } -- cgit v1.3.1