Color terminal output

Did you ever experience that a template error in C++ produced tons of terminal output, making the task of finding the actual offending error very tedious. Yesterday I stumbled upon a handy little tool called colout (http://nojhan.github.io/colout/).

You can install it using pip:
sudo pip install colout

No invoke the compiler (we redirect both stdout and stderr to the colout tool):
g++ main.cpp 2>&1 | colout error

Now you should see the word “error” nicely highlighted in red.

Leave a Reply

Your email address will not be published. Required fields are marked *