grc works great for this. It is installable with brew and colorizes a number of terminal commands out of the box, diff being one of them. To build on the approved answer: grc works great for this. It is installable with brew and colorizes a number of terminal commands out of the box, diff being one of them.
- First install
grc
via homebrew
brew install grc
- Then you need to set up your aliases, the brew caveat provides a solution. Simply add the following line to your ./bashrc or ./bash_profile
source "`brew --prefix`/etc/grc.bashrc"
- This will create the following aliases
alias colourify="$GRC -es --colour=auto"
alias configure='colourify ./configure'
alias diff='colourify diff'
alias make='colourify make'
alias gcc='colourify gcc'
alias g++='colourify g++'
alias as='colourify as'
alias gas='colourify gas'
alias ld='colourify ld'
alias netstat='colourify netstat'
alias ping='colourify ping'
alias traceroute='colourify /usr/sbin/traceroute'
alias head='colourify head'
alias tail='colourify tail'
alias dig='colourify dig'
alias mount='colourify mount'
alias ps='colourify ps'
alias mtr='colourify mtr'
alias df='colourify df'