diff options
| author | slamp <slaamp@gmail.com> | 2025-02-19 05:52:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 20:52:42 -0800 |
| commit | e2f10db3f0d63ac8d39d5429e8a5e9c446b0b0a8 (patch) | |
| tree | 12d12b7a06c67ae6e48e0ac3fa561664e3358563 /crates | |
| parent | feat: Add the --print0 option to search (#2562) (diff) | |
| download | atuin-e2f10db3f0d63ac8d39d5429e8a5e9c446b0b0a8.zip | |
fix: add .histfile as file to look for when doing atuin import zsh (#2588)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/atuin-client/src/import/zsh.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<PathBuf> { // 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) => { |
