euporie.core.history
Define input history loaders.
Classes
|
Base |
|
Load the kernel's command history. |
- class euporie.core.history.KernelHistory(kernel: Kernel, n: int = 1000)
Bases:
History
Load the kernel’s command history.
- get_strings() list[str]
Get the strings from the history that are loaded so far. (In order. Oldest item first.)
- async load() AsyncGenerator[str, None]
Load the history and yield all entries, most recent history first.
This method can be called multiple times from the Buffer to repopulate the history when prompting for a new input. So we are responsible here for both caching, and making sure that strings that were were appended to the history will be incorporated next time this method is called.
- Yields:
Each history string