peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.05k stars 132 forks source link

add function to clear history #83

Closed tzneal closed 8 years ago

tzneal commented 8 years ago

ClearHistory along with Read/WriteHistory can be used if implementing modal prompts to provide a unique history per command sets.

peterh commented 8 years ago

Sorry for the delayed reply.

My first thought was "Why not ReadHistory an empty reader?", but it turns out that ReadHistory appends to the existing history.

Thanks for the patch!