-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crossterm works partially for MSYS, CGWIN, Mintty, CI/CD on Windows. #580
Comments
For terminal size, on Git Bash (which uses MSYS2 behind the scenes), |
Hi @TimonPost Just wanted to add something to the discussion here - someone might find it useful. For mintty terminalMost Windows-native, non-MSYS2 apps don't work inside mintty, You need to set the environment variable For conhost, or (newer) Windows terminalWhen using Git Bash, you need to launch the TUI apps with the alias ttyper='TERM= ttyper'
alias lapin='TERM= lapin'
alias btm='TERM= btm'
alias rusty-rain='TERM= rusty-rain'
alias gping='TERM= gping'
alias pipes-rs='TERM= pipes-rs' |
FWIW, in MINGW64, if I build+run my crossterm app with "cargo run", it works great, but if I try to directly run the same generated exe, it creates the console spew outlined above. Running "./target/debug/myexe.exe | cat" works (but slowly) |
In MSYS2 (git bash), directly run exe not works, but run with |
trick: when on mintty, try " |
Describe the bug
MSYS, CGWIN, Mintty (e.g. gitbash, windows ssh-terminals) have in common that they are tools that do not have access to the internal WinAPI of windows. This is a problem when they try to do operations that are implemented with system calls (not via ANSI codes). This is the case for retrieving operations like input, terminal size, cursor position. Operations that use ANSI codes work perfectly fine.
According to the creator of winapi rust crate, he said:
So apparently crossterm will have not access to the console handles in the mentioned emulators. And perhaps a workaround is to use read/write file instead for read/write console. But this solution is different for each type of retrieving operation. I am not sure how to go about this, if one has any ideas on the best way to go around this, feel free to leave a comment.
Related issues:
The text was updated successfully, but these errors were encountered: