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

tty detection for mintty #10

Closed
BurntSushi opened this issue Nov 22, 2016 · 1 comment
Closed

tty detection for mintty #10

BurntSushi opened this issue Nov 22, 2016 · 1 comment

Comments

@BurntSushi
Copy link
Contributor

Over time, ripgrep has grown its own tty detection code which includes a hack for (seemingly reliably) detecting the presence of a tty on Windows inside mintty. Would you be interested in a PR that brings it to this crate?

There isn't much code, but you can see it all here: https://github.com/BurntSushi/ripgrep/blob/master/src/atty.rs

There is a pretty long issue on the topic of mintty detection here, which includes the provenance of the hack: BurntSushi/ripgrep#94 --- Spoiler alert: it's what git does.

@softprops
Copy link
Owner

Absolutely! It never amazes me how complicated windows makes solving this seemingly simple problem

BurntSushi added a commit to BurntSushi/atty that referenced this issue Jan 8, 2017
This improves the tty detection in MSYS terminal environments on
Windows. Specifically, it uses heuristics to determine whether a
standard handle is a pipe or a tty.

Behavior in normal Windows consoles remains unchanged.

Fixes softprops#10
BurntSushi added a commit to BurntSushi/atty that referenced this issue Jan 14, 2017
This improves the tty detection in MSYS terminal environments on
Windows. Specifically, it uses heuristics to determine whether a
standard handle is a pipe or a tty.

Behavior in normal Windows consoles remains unchanged.

Fixes softprops#10
BurntSushi added a commit to BurntSushi/atty that referenced this issue Jan 14, 2017
This improves the tty detection in MSYS terminal environments on
Windows. Specifically, it uses heuristics to determine whether a
standard handle is a pipe or a tty.

Behavior in normal Windows consoles remains unchanged.

Fixes softprops#10
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

No branches or pull requests

2 participants