Skip to content

Improve win32 portability of display and progressbar - #708

Open
fredemmott wants to merge 2 commits into
trabucayre:masterfrom
fredemmott:win32-terminal
Open

Improve win32 portability of display and progressbar#708
fredemmott wants to merge 2 commits into
trabucayre:masterfrom
fredemmott:win32-terminal

Conversation

@fredemmott

Copy link
Copy Markdown
  • modern windows terminals support terminal escape codes, however MSVC does not recognize \e
  • win32 isatty() returns 0 or non-zero (in my case, 64) instead of just '0 or 1'. All other callers of isatty in v1.1.1 only check truthiness, not == 1

refs #704

refs trabucayre#704

Modern Windows terminals support these escape sequences, but MSVC does not recognize `\e` as a valid escape sequence
- POSIX, Linux: returns 0 or 1
- MSDN `_isatty()` (isatty is macro for that): returns 0 or non-zero. In Windows Terminal, it's returning 64 for me

Other calls are only checking truthiness, not explicitly for 1

refs trabucayre#704
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.

1 participant