Ignore commands beginning with a space, resolve #114 (#123)

This commit is contained in:
Ellie Huxtable 2021-05-14 08:31:29 +01:00 committed by GitHub
parent a127408e93
commit f55d5cf0bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);