diff --git a/src/command/history.rs b/src/command/history.rs index 5811eed99d2..13916958b95 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -109,6 +109,12 @@ impl Cmd { match self { Self::Start { command: words } => { let command = words.join(" "); + + if command.starts_with(' ') { + println!(" "); + return Ok(()); + } + let cwd = env::current_dir()?.display().to_string(); let h = History::new(chrono::Utc::now(), command, cwd, -1, -1, None, None);