From e2f10db3f0d63ac8d39d5429e8a5e9c446b0b0a8 Mon Sep 17 00:00:00 2001 From: slamp Date: Wed, 19 Feb 2025 05:52:42 +0100 Subject: fix: add .histfile as file to look for when doing atuin import zsh (#2588) --- crates/atuin-client/src/import/zsh.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/atuin-client/src/import/zsh.rs b/crates/atuin-client/src/import/zsh.rs index 5bc8fc16..07785967 100644 --- a/crates/atuin-client/src/import/zsh.rs +++ b/crates/atuin-client/src/import/zsh.rs @@ -21,11 +21,12 @@ pub struct Zsh { fn default_histpath() -> Result { // oh-my-zsh sets HISTFILE=~/.zhistory // zsh has no default value for this var, but uses ~/.zhistory. + // zsh-newuser-install propose as default .histfile https://github.com/zsh-users/zsh/blob/master/Functions/Newuser/zsh-newuser-install#L794 // we could maybe be smarter about this in the future :) let user_dirs = UserDirs::new().ok_or_else(|| eyre!("could not find user directories"))?; let home_dir = user_dirs.home_dir(); - let mut candidates = [".zhistory", ".zsh_history"].iter(); + let mut candidates = [".zhistory", ".zsh_history", ".histfile"].iter(); loop { match candidates.next() { Some(candidate) => { -- cgit v1.3.1