diff options
author | Patrick Jackson <patrick@jackson.dev> | 2022-10-19 03:57:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 11:57:51 +0100 |
commit | 17c2e73388f1f07f86f74cdd422996dabfec2095 (patch) | |
tree | 66937556d859c25c5bf4946a8385ddd7b3da8679 | |
parent | 540aa790545ac519f4e7c5abe97b15658d93e508 (diff) |
Never use HISTFILE for fish shell import (#573)
-rw-r--r-- | atuin-client/src/import/fish.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/atuin-client/src/import/fish.rs b/atuin-client/src/import/fish.rs index af932d74..84f4a2f1 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<PathBuf> { 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<Self> { 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 }) } |