From f55d5cf0bfa59af144788bec7c9d0a9ada71aad4 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 14 May 2021 08:31:29 +0100 Subject: Ignore commands beginning with a space, resolve #114 (#123) --- src/command/history.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/command/history.rs b/src/command/history.rs index 5811eed9..9c792cf0 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -109,6 +109,11 @@ impl Cmd { match self { Self::Start { command: words } => { let command = words.join(" "); + + if command.starts_with(' ') { + return Ok(()); + } + let cwd = env::current_dir()?.display().to_string(); let h = History::new(chrono::Utc::now(), command, cwd, -1, -1, None, None); -- cgit v1.2.3