-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Windows 10 Virtual Terminal Sequence Support #22
Comments
@slurps-mad-rips thanks for reaching out to me. It's definitely in my TODO, and now I know at least someone would like to have this. The main challenge right now for me is:
I'll think about it and will come up with some solution for sure. :) |
In order to address a bunch of edge cases this patch introduces a set of new macros to control Termcolor's behaviour in certain situations. See changes summary below. * Termcolor used to abort compilation if unsupported target platform is detected. This patch changes this behaviour since colorization is not assumed to be essential and hence it's better to noop rather than abort compilation. * Termcolor used to always use Windows API when target OS is Windows. Now one can define TERMCOLOR_USE_ANSI_ESCAPE_SEQUENCES in order to enforce ANSI escape sequences even for Windows. This is useful when one wants to use ANSI escape sequences on Windows 10. https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences * Termcolor used to always colorize output if the platform is detected. Now one can define TERMCOLOR_USE_NOOP to turn off colorization and trick termcolor to be noop. Closes #22 Closes #29 Closes #49
Hello!
Windows 10 supports VT100 escape sequences with a call to
SetConsoleMode
and theENABLE_VIRTUAL_TERMINAL_PROCESSING
flag. Using this would give Windows users more features. You can also, for non Windows 10 versions, fallback to the current behavior.The text was updated successfully, but these errors were encountered: