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 /atuin-client/src/import | |
| parent | Bump async-trait from 0.1.57 to 0.1.58 (#575) (diff) | |
| download | atuin-17c2e73388f1f07f86f74cdd422996dabfec2095.zip | |
Never use HISTFILE for fish shell import (#573)
Diffstat (limited to 'atuin-client/src/import')
| -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 }) } |
