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/command/mod.rs | |
| 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/command/mod.rs')
| -rw-r--r-- | src/command/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command/mod.rs b/src/command/mod.rs index 4ac62385..2e8d4778 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -26,6 +26,10 @@ pub enum AtuinCmd { Uuid, } +pub fn uuid_v4() -> String { + Uuid::new_v4().to_simple().to_string() +} + impl AtuinCmd { pub fn run(self, db: &mut Sqlite) -> Result<()> { match self { @@ -34,7 +38,7 @@ impl AtuinCmd { Self::Server(server) => server.run(), Self::Uuid => { - println!("{}", Uuid::new_v4().to_simple().to_string()); + println!("{}", uuid_v4()); Ok(()) } } |
