-
Install
colordiff
using Homebrew:brew install colordiff
-
Add function to your
~/.bash_profile
:cat <<EOF >>~/.bash_profile function diff { colordiff -u "$@" } EOF
-
Change default output colours to match git:
cat <<EOF >~/.colordiffrc newtext=green oldtext=red diffstuff=cyan EOF
-
Reload:
. ~/.bash_profile
-
Profit.
Notes on switches:
-u
indiff
means: unified diff