-
Notifications
You must be signed in to change notification settings - Fork 288
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 v0.10.1 can't open raw mode when input is piped to stdin #188
Comments
Surely The docs have an explanation of why it wasn’t written that way, but the explanation is manifestly wrong—the underlying code, at least on Unix, calls operations on fd 0 (stdin), not fd 1 (stdout). |
As discussed in crossterm-rs/crossterm#188, the terminal might not be stdin. Signed-off-by: Anders Kaseorg <[email protected]>
As discussed in crossterm-rs/crossterm#188, the terminal might not be stdin. Signed-off-by: Anders Kaseorg <[email protected]>
As discussed in crossterm-rs/crossterm#188, the terminal might not be stdin. Signed-off-by: Anders Kaseorg <[email protected]>
As discussed in crossterm-rs/crossterm#188, the terminal might not be stdin. Signed-off-by: Anders Kaseorg <[email protected]>
Sorry I have never responded to this issue. Since basically, the whole crossterm library was refactored after 0.10 and we have been moving over to /dev/tty for everything this issue might be resolved. I'll close it for now. |
Thanks for the update! I'll give it a try and report back if there's still trouble. |
In previous versions of crossterm (v0.8.2) it was possible to enable raw input mode when input was piped in, e.g.
Using some trickery, you could continuously read piped output while still receiving key events. However, in crossterm v0.10 (and probably since the big v0.9 refactor, but I haven't confirmed),
RawScreen::into_raw_mode()
returns an error if input is piped into the app:I've made a small demo of this working in v0.8 but breaking in v0.10: https://github.com/timothyb89/crossterm-stdin-test
The text was updated successfully, but these errors were encountered: