From 17c2e73388f1f07f86f74cdd422996dabfec2095 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Wed, 19 Oct 2022 03:57:51 -0700 Subject: [PATCH] Never use HISTFILE for fish shell import (#573) --- atuin-client/src/import/fish.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/atuin-client/src/import/fish.rs b/atuin-client/src/import/fish.rs index af932d7..84f4a2f 100644 --- a/atuin-client/src/import/fish.rs +++ b/atuin-client/src/import/fish.rs @@ -8,7 +8,7 @@ use chrono::{prelude::*, Utc}; use directories::BaseDirs; use eyre::{eyre, Result}; -use super::{get_histpath, unix_byte_lines, Importer, Loader}; +use super::{unix_byte_lines, Importer, Loader}; use crate::history::History; #[derive(Debug)] @@ -36,7 +36,7 @@ fn default_histpath() -> Result { if histpath.exists() { Ok(histpath) } else { - Err(eyre!("Could not find history file. Try setting $HISTFILE")) + Err(eyre!("Could not find history file.")) } } @@ -46,8 +46,7 @@ impl Importer for Fish { async fn new() -> Result { let mut bytes = Vec::new(); - let path = get_histpath(default_histpath)?; - let mut f = File::open(path)?; + let mut f = File::open(default_histpath()?)?; f.read_to_end(&mut bytes)?; Ok(Self { bytes }) }