peterh / liner

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

Expose history retrieval #56

Closed pires closed 9 years ago

pires commented 9 years ago

For people using this library in CLI tools, it's always interesting to be able to get the history without needing to re-read the history file(s).

peterh commented 9 years ago

You can retrieve history without touching the file system by using a bytes.Buffer with the existing WriteHistory function.