From 440c4fc2335d5286d14367e39c99bb4946efe9e3 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 13 Feb 2021 20:21:49 +0000 Subject: Add sessions --- src/command/history.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/command/history.rs') diff --git a/src/command/history.rs b/src/command/history.rs index 72f821c5..4caf4c17 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -32,13 +32,21 @@ pub enum HistoryCmd { } impl HistoryCmd { - pub fn run(&self, db: SqliteDatabase) -> Result<()> { + pub fn run(&self, db: &mut SqliteDatabase) -> Result<()> { match self { HistoryCmd::Start { command: words } => { let command = words.join(" "); let cwd = env::current_dir()?.display().to_string(); - let h = History::new(chrono::Utc::now().timestamp_nanos(), command, cwd, -1, -1); + let h = History::new( + chrono::Utc::now().timestamp_nanos(), + command, + cwd, + -1, + -1, + None, + None, + ); // print the ID // we use this as the key for calling end -- cgit v1.3.1