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/xonsh.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/xonsh.rs')
| -rw-r--r-- | crates/atuin-client/src/import/xonsh.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/atuin-client/src/import/xonsh.rs b/crates/atuin-client/src/import/xonsh.rs index d041c648..201cad15 100644 --- a/crates/atuin-client/src/import/xonsh.rs +++ b/crates/atuin-client/src/import/xonsh.rs @@ -10,7 +10,7 @@ use time::OffsetDateTime; use uuid::Uuid; use uuid::timestamp::{Timestamp, context::NoContext}; -use super::{Importer, Loader, get_histpath}; +use super::{Importer, Loader, get_histdir_path}; use crate::history::History; use crate::utils::get_host_user; @@ -102,7 +102,7 @@ impl Importer for Xonsh { async fn new() -> Result<Self> { // wrap xonsh-specific path resolver in general one so that it respects $HISTPATH let xonsh_data_dir = env::var("XONSH_DATA_DIR").ok(); - let hist_dir = get_histpath(|| xonsh_hist_dir(xonsh_data_dir))?; + let hist_dir = get_histdir_path(|| xonsh_hist_dir(xonsh_data_dir))?; let sessions = load_sessions(&hist_dir)?; let hostname = get_host_user(); Ok(Xonsh { sessions, hostname }) |
