We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f05e0e commit fe15154Copy full SHA for fe15154
crates/atuin-client/src/import/replxx.rs
@@ -19,8 +19,23 @@ fn default_histpath() -> Result<PathBuf> {
19
let home_dir = user_dirs.home_dir();
20
21
// There is no default histfile for replxx.
22
- // For simplicity let's use the most common one.
23
- Ok(home_dir.join(".histfile"))
+ // Here we try a couple of common names.
+ let mut candidates = ["replxx_history.txt", ".histfile"].iter();
24
+ loop {
25
+ match candidates.next() {
26
+ Some(candidate) => {
27
+ let histpath = home_dir.join(candidate);
28
+ if histpath.exists() {
29
+ break Ok(histpath);
30
+ }
31
32
+ None => {
33
+ break Err(eyre!(
34
+ "Could not find history file. Try setting and exporting $HISTFILE"
35
+ ));
36
37
38
39
}
40
41
#[async_trait]
0 commit comments