Colorful Error Output

by Miguel de Icaza

This is a cute hack that I put together today.

For months I have wanted to colorize the output of the compiler for errors. Sometimes in a sea of warnings its difficult to find the error that broke the build with a quick visual inspection.

Most civilized people use IDEs, or even Emacs to build their stuff, but for some reason I end up building from an xterm all the time.

Today I introduced the MCS_COLORS environment variable that the compiler will use to configure its colors, the default. This is the default, witness this high-tech beauty:

My personal default is slightly different, as I use grey-on-black terminals, its more of a DOS-days Turbo-Pascal kind of color scheme for errors:

This is my personal setting:

	export MCS_COLORS=errors=brightwhite,red

Am not making this the default, it seems too strong for public consumption.

If you absolutely hate this, you can use:

	export MCS_COLORS=disable

Posted on 21 Dec 2007