From f0fca3d7f34814a8a3cf5d3be3578f747ecda562 Mon Sep 17 00:00:00 2001 From: Benjamin Weinstein-Raun Date: Mon, 24 Mar 2025 04:00:16 -0700 Subject: 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. --- crates/atuin-client/src/import/bash.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/atuin-client/src/import/bash.rs') diff --git a/crates/atuin-client/src/import/bash.rs b/crates/atuin-client/src/import/bash.rs index 93d1fcf5..2c4b29b8 100644 --- a/crates/atuin-client/src/import/bash.rs +++ b/crates/atuin-client/src/import/bash.rs @@ -6,7 +6,7 @@ use eyre::{Result, eyre}; use itertools::Itertools; use time::{Duration, 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; @@ -27,7 +27,7 @@ impl Importer for Bash { const NAME: &'static str = "bash"; async fn new() -> Result { - let bytes = read_to_end(get_histpath(default_histpath)?)?; + let bytes = read_to_end(get_histfile_path(default_histpath)?)?; Ok(Self { bytes }) } -- cgit v1.3.1