Closed samertm closed 9 years ago
Thanks for the bug report.
If I move the test for terminalSupported, it preempts the stdout redirection test. I'll have to find a block of free time to work on finding the correct fix.
I didn't actually test with emacs. Please give the latest commit a try and let me know if it doesn't behave the way you expect.
Yes, it works for me! And by extension, this makes my app, cayley, and gore all work with my normal shell workflow :) thanks!
(State).Prompt return
ErrNotTerminalOutput
when called from called from "eshell" or "shell-mode" in Emacs because it doesn't know how many columns the output is (I believe that's the correct interpretation of https://github.com/peterh/liner/blob/master/input.go#L70, which is where outputRedirected is being set). (State).promptUnsupported works, though, and if you move the terminalSupported check above the outputRedirected check (https://github.com/peterh/liner/blob/master/line.go#L472), everything works as expected.Liner is great, thanks for the solid library.