Skip to content

make insert_into_history less dumb #434

@sebastinas

Description

@sebastinas

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 [''].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions