aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/history.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-02-13 20:21:49 +0000
committerEllie Huxtable <e@elm.sh>2021-02-13 20:24:22 +0000
commit440c4fc2335d5286d14367e39c99bb4946efe9e3 (patch)
tree766f33c9c6b87998f22bc146fe7361e798b377df /src/command/history.rs
parentImplement history import (diff)
downloadatuin-440c4fc2335d5286d14367e39c99bb4946efe9e3.zip
Add sessions
Diffstat (limited to 'src/command/history.rs')
-rw-r--r--src/command/history.rs12
1 files changed, 10 insertions, 2 deletions
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