Unconditionally appends the specified line to the history.
Unconditionally appends the specified line to the history.
the line to add
Clear the history buffer
Get the contents of the history buffer, in a list.
Get the contents of the history buffer, in a list.
the history lines
Get the last (i.
Get the last (i.e., most recent) entry from the buffer.
the most recent entry, as an Option
, or
None
if the history buffer is empty
Get maximum history size.
Get maximum history size.
the current max history size, or 0 for unlimited.
Set maximum history size.
Set maximum history size.
the new max history size, or 0 for unlimited.
Get the current number of entries in the history buffer.
Get the current number of entries in the history buffer.
the size of the history buffer
Add a line to the history.
Add a line to the history. Does not add the line if it is identical to the most recently added line.
the line to add
Load the contents of the history from the specified path, overwriting any existing history data (i.
Load the contents of the history from the specified path, overwriting any existing history data (i.e., clearing the history buffer first).
where to save the history
Save the contents of the history to the specified path.
Save the contents of the history to the specified path.
where to save the history
Models a Readline history: an object that holds previously read lines.
Use JLine <https://github.com/jline/jline2>