diff --git a/atuin-client/src/import/fish.rs b/atuin-client/src/import/fish.rs index 7186537..e54ca73 100644 --- a/atuin-client/src/import/fish.rs +++ b/atuin-client/src/import/fish.rs @@ -19,7 +19,10 @@ pub struct Fish { /// see https://fishshell.com/docs/current/interactive.html#searchable-command-history fn default_histpath() -> Result { let base = BaseDirs::new().ok_or_else(|| eyre!("could not determine data directory"))?; - let data = base.data_local_dir(); + let data = std::env::var("XDG_DATA_HOME").map_or_else( + |_| base.home_dir().join(".local").join("share"), + PathBuf::from, + ); // fish supports multiple history sessions // If `fish_history` var is missing, or set to `default`, use `fish` as the session