Skip to content

History refurbish - #22

Open
jorbakk wants to merge 87 commits into
daanx:mainfrom
jorbakk:history
Open

History refurbish#22
jorbakk wants to merge 87 commits into
daanx:mainfrom
jorbakk:history

Conversation

@jorbakk

@jorbakk jorbakk commented Mar 30, 2023

Copy link
Copy Markdown

New backend for handling a large number of history entries along with a different user interface for handling the history:

  • practically unlimited number of history entries with fast access thanks to an sqlite backend
  • history hints are shown while typing input or navigating history (similar to fish shell)
  • input can be seamlessly extended with the history hint using the usual keys for cursor movement
  • history hints are continuously updated using a prefix based search through history while typing

The sqlite backend adds a dependency and could be replaced by e.g. a memory mapped file in the long run. However, currently it's easier to explore more advanced features with the sqlite backend. Advanced features could be:

  • handle parallel sessions (e.g. based on terminal name) and merge history when exiting a session
  • prioritize commands issued in the current working directory
  • add a directory history
  • ...

jorbakk added 30 commits March 18, 2023 18:43
jorbakk added 28 commits March 26, 2023 09:25
This would lead to inconsistencies with showing/hiding and handling
the history entries.
Implementation is most likely not fully correct ... it's just to
show that the original backend should also work with the new API.
@daanx

daanx commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Thank you for your PR! and apologies for the late reply. I like the idea but I am very hesitant to merge this as it creates a big dependency. It is a bit too much for the scope of this project. I will leave the PR up though for others that may want to include this. Thanks again.

@jorbakk

jorbakk commented May 27, 2026

Copy link
Copy Markdown
Author

You're very welcome. Thanks for starting this great project in the first place!

I actually use it as a daily driver (repline) for my shell (plan9 rc shell, rci) since about 3 years with some improvements along the line and I'm quite happy. Replacing sqlite3 by something simpler is still on my list ... though I think it's okay for the interactive UI part of a repl/interpreter which should be an optional user interface and available separately.

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.

2 participants