peterh / liner

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

Implement NewLinerTTY for using liner connecting tty regardless of redirections #127

Closed itchyny closed 4 years ago

itchyny commented 4 years ago

Currently liner changes the behavior based on redirections. This is sometimes useful to support both terminal input and pipe input, but is troublesome when I want to use always from terminal. I want to accept user's input from tty without breaking both stdin and stdout. This pull request introduces new function NewLinerTTY for connecting both input and output to tty so that we can use liner regardless of the redirections. Note that months ago I submitted #121 however this was insufficient.

peterh commented 4 years ago

I consider liner "done" at this point. Someone (maybe you?) should fork liner if a library with more features (and more dependencies, and more API surface) is desired.

itchyny commented 4 years ago

I consider liner "done" at this point. Someone (maybe you?) should fork liner if a library with more features (and more dependencies, and more API surface) is desired.

Okay, thank you for review and the library.