From 6636f5878ac11d6461b9958af025021486a7d58f Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Sun, 14 Feb 2021 18:40:51 +0000 Subject: zsh bin is sometimes /usr/bin/zsh or might be elsewhere too (#8) zsh also uses ~/.zsh_history get better errors for not found history file --- src/local/history.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/local') diff --git a/src/local/history.rs b/src/local/history.rs index d88353f9..05600b80 100644 --- a/src/local/history.rs +++ b/src/local/history.rs @@ -1,6 +1,6 @@ use std::env; -use uuid::Uuid; +use crate::command::uuid_v4; #[derive(Debug)] pub struct History { @@ -26,12 +26,12 @@ impl History { ) -> Self { let session = session .or_else(|| env::var("ATUIN_SESSION").ok()) - .unwrap_or_else(|| Uuid::new_v4().to_simple().to_string()); + .unwrap_or_else(uuid_v4); let hostname = hostname.unwrap_or_else(|| hostname::get().unwrap().to_str().unwrap().to_string()); Self { - id: Uuid::new_v4().to_simple().to_string(), + id: uuid_v4(), timestamp, command, cwd, -- cgit v1.3.1