Gcc
From Attie's Wiki
Highlight the output of gcc
- warnings will be highlighted yellow
- errors will be highlighted red
make 2>&1 | sed -re 's/^([^:]+:[0-9]+:[0-9]+: warning: .+)$/\x1B[93m&\x1B[m/g' -e 's/^([^:]+:[0-9]+:[0-9]+: error: .+)$/\x1B[91m&\x1B[m/g'
Or try this one, to dim everything that isn't interesting:
make "$@" 2>&1 | sed -re 's/^[^:]+:[0-9]+:[0-9]+: warning: .+$/\x1B[93m&\x1B[m/g' -e 's/^[^:]+:[0-9]+:[0-9]+: error: .+$/\x1B[91m&\x1B[m/g' -e 's/^[^:]+: In function \x27[^\x27]+\x27:$/\x1B[97m&\x1B[m/g' -e 's/^[^\x1B].+$/\x1B[90m&\x1B[m/'
script form
Or, put this in your path, called mk
or something:
#!/bin/bash make "$@" 2>&1 | sed -re 's/^[^:]+:[0-9]+:[0-9]+: warning: .+$/\x1B[93m&\x1B[m/g' -e 's/^[^:]+:[0-9]+:[0-9]+: error: .+$/\x1B[91m&\x1B[m/g' -e 's/^[^:]+: In function \x27[^\x27]+\x27:$/\x1B[97m&\x1B[m/g' -e 's/^[^\x1B].+$/\x1B[90m&\x1B[m/' exit $?