This diff adds line-editing to llgoi, by
vendoring and using github.com/peterh/liner.
I have only implemented the basics here;
follow-ups will come later to add persisted
history, and completion,
Details
Diff Detail
Event Timeline
Thanks for working on this much-needed usability improvement.
I played around with your change locally, and it seems to break one of the tests (llgoi/panic.test).
cmd/llgoi/llgoi.go | ||
---|---|---|
503 | It doesn't look like liner deals with multi-line history entries very well. (e.g. try typing "{<nl>}<nl><up>" and then editing the line). Can we maybe strip newlines and apply semicolon insertion where necessary instead of saving the literal newlines? | |
522 | It looks like liner doesn't do this for us, so we probably need to keep doing it ourselves. |
Collapse history lines, add semicolons
Also, append newlines to lines passed
to readLine, and reinstate newline
written when in terminal mode.
Please add liner to the list of third-party packages in LICENSE.TXT. Other than that, LGTM.
update_third_party.sh | ||
---|---|---|
104 | Wouldn't this leave a .git directory in third_party/liner? |
It doesn't look like liner deals with multi-line history entries very well. (e.g. try typing "{<nl>}<nl><up>" and then editing the line). Can we maybe strip newlines and apply semicolon insertion where necessary instead of saving the literal newlines?