AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 349 forks source link

[WIP] Make survey work under mintty on Windows #456

Open mislav opened 1 year ago

mislav commented 1 year ago

Survey does not work under mintty (e.g. Git Bash) on Windows. This is due to mintty not supporting some Console APIs that survey depends on.

This experimental spike switches to an approach where under mintty we switch to handling keystrokes via POSIX escape sequences, something that was previously shipped to only non-Windows builds. For this to work, POSIX key handling was moved under a file that is included in both Windows and non-Windows build.

Status: code spike. Not sure how viable this is yet, or whether I will be able to make this into something shippable. Will keep open for a while as an idea.