Ticket #114 (new defect)
does not play well with minTTY on windows
| Reported by: | malcolmw | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Version: | Keywords: | ||
| Cc: |
Description
Haskeline, at least when baked into a Windows-native build of ghc, appears not to work well with the minTTY terminal emulator. Neither the arrow keys, nor vi key bindings do anything useful - they simply corrupt the buffer being passed to the underlying program by adding odd non-printable characters.
I think the cause is similar to the reason that Windows-native Python does not work interactively in minTTY without special options. To quote http://code.google.com/p/mintty/issues/detail?id=56
"This is due to MinTTY being based on Cygwin pty's, which do not play well with Windows console apps. [...] basically it's because the pty emulation is based on pipes, which means that a Win32 application running in MinTTY sees a pipe rather than a console as its input, so it behaves differently."
For instance, the _isatty() call will return False when run inside minTTY. The webpage goes into some more details, but I think the main problem is that Windows-native (rather than Cygwin) programs have no API available to them to manipulate a "pseudo terminal".
I'm not certain the issue is fixable in Haskeline, but thought it worth noting, even if only for googleability.
