-
-
Notifications
You must be signed in to change notification settings - Fork 252
make insert_into_history less dumb #434
Copy link
Copy link
Closed
Labels
Description
As it is currently implemented, insert_into_history can break the assumption that rl_history.entries has at least one element.
Since this function works with internal data of History, the logic of reading and writing the history file, should be moved to History. Let's call the new function in History something like append_reload_and_write (better names welcome). It would load the history file, append the entry and write the history file back. At the end it would check if entries has at least one element, and if not sets it to [''].
Reactions are currently unavailable