Skip to content
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

Prefer /dev/tty over stdin in terminal functions #501

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

acidghost
Copy link
Contributor

This is part of #500.

Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One quick thing in case you were not aware of this, the tty_fd does not yet use prefer /dev/tty over STDIN.

pub fn tty_fd() -> Result<FileDesc> {

But this is a good thing for now, until the MacOs issue is resolved we should not default it to /dev/tty. However, with this pull request its just a matter of changing the dev/tty at a later stage.

Is that good with you? if so ill merge it.

@acidghost
Copy link
Contributor Author

Select on macOS supports both stdin and /dev/tty, the isatty should be enough to check which of the two to use.

Anyhow, you can merge it as is and I’ll do some testing when select implementation is in.

@TimonPost TimonPost merged commit aa8436e into crossterm-rs:master Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants