aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/import/resh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'atuin-client/src/import/resh.rs')
-rw-r--r--atuin-client/src/import/resh.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/atuin-client/src/import/resh.rs b/atuin-client/src/import/resh.rs
index 6fa27b5a..3c5b799e 100644
--- a/atuin-client/src/import/resh.rs
+++ b/atuin-client/src/import/resh.rs
@@ -122,18 +122,17 @@ impl Importer for Resh {
difference.num_nanoseconds().unwrap_or(0)
};
- h.push(History {
- id: uuid_v7().as_simple().to_string(),
- timestamp,
- duration,
- exit: entry.exit_code,
- command: entry.cmd_line,
- cwd: entry.pwd,
- session: uuid_v7().as_simple().to_string(),
- hostname: entry.host,
- deleted_at: None,
- })
- .await?;
+ let imported = History::import()
+ .command(entry.cmd_line)
+ .timestamp(timestamp)
+ .duration(duration)
+ .exit(entry.exit_code)
+ .cwd(entry.pwd)
+ .hostname(entry.host)
+ // CHECK: should we add uuid here? It's not set in the other importers
+ .session(uuid_v7().as_simple().to_string());
+
+ h.push(imported.build().into()).await?;
}
Ok(())