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
ANSI colour support and terminal detection #131
Conversation
Provides POSIX/UNIX counterpart for Windows colours implementation using ANSI escape codes. It also detects if stdout is a tty and disables colours when using pipes or file output.
Just a quick note to let you know I'm not ignoring you. I'm hoping to have a look at it in the next week to try and get it integrated (it may not merge smoothly as is as I've been doing some wide-ranging refactoring). |
Phil, no worries. If you prefer I can rebase & update these changes once you got yours pushed to master. This way we will be sure they actually work well after source base refactoring. |
Finally got to look at it this evening. It was actually very straightforward. In fact if you define that it will use POSIX colour codes even on Windows (e.g. for targeting Cygwin). Thanks again for contributing it. It's now committed on the Integration branch. |
Well, if I can put my 2 cents. The reason being is that Windows always gets colours, and Unix not, which makes Catch inconsistent across platforms which is IMHO bad. Please note Btw. IMHO P.S. Can you have a look at my other patch (regarding Clang compiler flag misuse)? |
Yes, I might start making it the default for cases where I do know for sure (e.g. when running on a Mac) - however I also have a few other reservations:
In fact I've been thinking of making it not the default even on Windows (or least disable-able). |
The ultimate question is for how many users these colors will serve great value and how many will be annoyed by these. |
As for the "ultimate question" - for now the killer reason is (1) - making sure it doesn't break the compile on other platforms. Beyond that I'm still not sure how many people would get annoyed. I don't have first-hand experience but I've heard many times that it's a bit of a minefield. Thanks for your feedback (and taking the time to type on an iPhone. I don't know about you but I'm finding it more difficult to type on my iPhone than it was five years ago - maybe I'm just getting old). |
Provides POSIX/UNIX counterpart for Windows colours implementation using ANSI escape codes. It also detects if stdout is a tty and disables colours when using pipes or file output.