Closed jnjackins closed 9 years ago
A better justification: my current method means I can't use the history feature without calling ReadHistory and WriteHistory on each iteration.
Here is a quick hack that solves my issue: https://github.com/jnjackins/liner/commit/4a96ae625abcc0e981b5e20562b51036c9b11f24
Thanks for the suggestion.
TerminalMode() already exists to allow you to reset and restore the terminal mode.
Start/Stop is probably a cleaner interface, but unfortunately it is too late to go back in time and remove TerminalMode.
Ah, somehow I didn't catch that TerminalMode is what I wanted. Obvious in hindsight. Thanks!
I have some code like this:
I need to close prompt because parse may need to take over stdin. It seems wasteful to call NewLiner with each iteration; is there interest in adding methods like Start and Stop in addition to Close?