diff options
| author | Benjamin Weinstein-Raun <b@w-r.me> | 2025-03-24 04:00:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 11:00:16 +0000 |
| commit | f0fca3d7f34814a8a3cf5d3be3578f747ecda562 (patch) | |
| tree | 58239d17449b03155022fc448478b4817554e668 /crates/atuin-client/src/import/zsh.rs | |
| parent | chore(deps): bump cachix/install-nix-action from 30 to 31 (#2633) (diff) | |
| download | atuin-f0fca3d7f34814a8a3cf5d3be3578f747ecda562.zip | |
fixes #1884: HISTFILE can be a directory or a file (#2630)
Xonsh history import was failing (in the default xonsh configuration)
because $HISTFILE is actually a directory in that case. This change sets
up the xonsh import to check for a *directory* instead of a regular
file, and makes it clearer that other importers expect a regular file.
Diffstat (limited to 'crates/atuin-client/src/import/zsh.rs')
| -rw-r--r-- | crates/atuin-client/src/import/zsh.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/atuin-client/src/import/zsh.rs b/crates/atuin-client/src/import/zsh.rs index f4b83cac..694a9aa8 100644 --- a/crates/atuin-client/src/import/zsh.rs +++ b/crates/atuin-client/src/import/zsh.rs @@ -9,7 +9,7 @@ use directories::UserDirs; use eyre::{Result, eyre}; use time::OffsetDateTime; -use super::{Importer, Loader, get_histpath, unix_byte_lines}; +use super::{Importer, Loader, get_histfile_path, unix_byte_lines}; use crate::history::History; use crate::import::read_to_end; @@ -49,7 +49,7 @@ impl Importer for Zsh { const NAME: &'static str = "zsh"; async fn new() -> Result<Self> { - let bytes = read_to_end(get_histpath(default_histpath)?)?; + let bytes = read_to_end(get_histfile_path(default_histpath)?)?; Ok(Self { bytes }) } |
