When working from the command line, I pass compiler output through a small tool that matches output lines against regular expressions and prints them in various corresponding colors.
Usage: replace your usual compiler invocation (in your build script, via a shell alias, etc.) with:
colorout LANGUAGE.col COMPILER ARGUMENTS…. For example, create a batch file containing:
@colorout.exe d.col rdmd.exe %*
This tool uses the new
std.process module to spawn a child process and process its output. Simply piping the output from the compiler to the tool would cause the compiler’s exit code to be lost.
Caveat: redirects stderr to stdout (because we can’t
select or test readability of a
std.process pipe). Currently Windows-only.