Skip to content

Commit

Permalink
Ignore commands beginning with a space, resolve #114
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie committed May 12, 2021
1 parent f041d7f commit 9ea844b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/command/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ea844b

Please sign in to comment.