diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2021-02-14 18:40:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-14 18:40:51 +0000 |
| commit | 6636f5878ac11d6461b9958af025021486a7d58f (patch) | |
| tree | 697d4c22700d0333213f66b88e36bdc2b25b6c99 /src/local | |
| parent | Specify nightly (diff) | |
| download | atuin-6636f5878ac11d6461b9958af025021486a7d58f.zip | |
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
Diffstat (limited to 'src/local')
| -rw-r--r-- | src/local/history.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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, |
