Commit 011fe31
authored
feat: support additional history filenames in replxx importer (#3005)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
The original implementation of the `replxx` importer, from PR #2024,
only supported `.histfile` as a filename for the history file, since
there is no default filename. However, the replxx codebase does use
`replxx_history.txt` as an example history filename (see
[here](https://github.com/AmokHuginnsson/replxx/blob/release-0.0.4/examples/c-api.c#L183)
and
[here](https://github.com/AmokHuginnsson/replxx/blob/release-0.0.4/examples/cxx-api.cxx#L383)),
so this patch adds support for that as an alternative filename.
The implementation was modeled after [the
one](https://github.com/atuinsh/atuin/blob/v18.10.0/crates/atuin-client/src/import/zsh.rs#L29-L44)
currently used for the `zsh` history file importer, which also means the
`replxx` importer now produces a human-friendly error if no history file
is found in the expected path(s).
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
/cc @amosbird who introduced this importer in #2024.1 parent dc5cb30 commit 011fe31
1 file changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
24 | 39 | | |
25 | 40 | | |
26 | 41 | | |
| |||
0 commit comments