Skip to content

Fix detecting terminal under Git Bash on Windows#119

Merged
vilmibm merged 1 commit intomasterfrom
term-cygwin
Nov 27, 2019
Merged

Fix detecting terminal under Git Bash on Windows#119
vilmibm merged 1 commit intomasterfrom
term-cygwin

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Nov 27, 2019

Git Bash is, to me, a very useful terminal emulator that comes with Git for Windows.

It looks like IsTerminal() from golang.org/x/crypto/ssh/terminal returns a false negative for Git Bash. I have switched to IsCygwinTerminal() from github.com/mattn/go-isatty and query tput cols to get terminal width.

@vilmibm vilmibm merged commit cb0cf74 into master Nov 27, 2019
@mislav mislav deleted the term-cygwin branch November 27, 2019 18:22
mislav pushed a commit that referenced this pull request Sep 28, 2021
ghcs: don't double-print errors
Stonre pushed a commit to Stonre/strands-fork that referenced this pull request Jul 21, 2025
cchristous pushed a commit to cchristous/cli that referenced this pull request Feb 28, 2026
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