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

Improve Ansi.AUTO cygwin detection on Windows #491

Closed
remkop opened this issue Sep 20, 2018 · 0 comments
Closed

Improve Ansi.AUTO cygwin detection on Windows #491

remkop opened this issue Sep 20, 2018 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Sep 20, 2018

Follow-up from #472:

The Ansi.AUTO mode doesn't work for me on Windows, but it seems the that JANSI code itself is not the best. My TERM is set to cygwin and I get ANSI codes. I think the code only checks for xterm.

Currently Ansi.AUTO.enabled() returns true on Windows if the TERM environment variable value starts with "xterm". According to this StackOverflow question, a better (additional) way is to use the OSTYPE environment variable.

OSTYPE is set to cygwin on Cygwin, and to msys on git-bash (MinGW).

@remkop remkop added this to the 3.7 milestone Sep 20, 2018
@remkop remkop modified the milestones: 3.7, 3.6.1 Sep 20, 2018
@remkop remkop closed this as completed Sep 20, 2018
remkop added a commit that referenced this issue Sep 29, 2018
…ically enabled when AnsiConsole is installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant