Skip to content

Introduce History trait#604

Merged
gwenn merged 28 commits intokkawakam:masterfrom
gwenn:history_trait
Jan 15, 2023
Merged

Introduce History trait#604
gwenn merged 28 commits intokkawakam:masterfrom
gwenn:history_trait

Conversation

@gwenn
Copy link
Copy Markdown
Collaborator

@gwenn gwenn commented Feb 23, 2022

Fix #127
Fix #442

TODO

Breaking changes:

  • Editor impacted (new generic type parameter I)
  • History renamed to FileHistory
  • History API impacted (to make trait object safe)

Fix kkawakam#127
Fix kkawakam#442

TODO
- [ ] check if `History::add` and `History::add_owned` can be fused
- [ ] put old / default `FileHistory` behind a feature
- [ ] SQLite based implementation behind a feature
- [ ] timestamped history ? Implementation detail ?
- [ ] editable entry ? later ?

Breaking changes:
* `Editor` impacted (new generic type parameter `I`)
* `History` renamed to `FileHistory`
* History API impacted (to make trait object safe)
@gwenn gwenn marked this pull request as draft February 23, 2022 18:26
@gwenn gwenn mentioned this pull request Apr 20, 2022
@gwenn gwenn changed the title [WIP] Introduce History trait Introduce History trait Nov 19, 2022
@gwenn gwenn marked this pull request as ready for review November 19, 2022 15:06
@gwenn
Copy link
Copy Markdown
Collaborator Author

gwenn commented Nov 19, 2022

If anyone is interested, I would like a code review.
Mainly on the History trait.
And on the SQLiteHistory implementation.
Which differs from reedline:

  • all entries are kept in the SQLite database.
  • and so entries may be added concurrently by different sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save lines in history file with a Unix timestamp More flexible history save/load

1 participant