When I have a diff, how can I colorize it so that it looks good?
I want it for the command line, so please no GUI solutions.
Man pages for diff suggest no solution for colorization from within itself. Please consider using colordiff. It's a wrapper around diff that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability:
diff
colordiff
diff old new | colordiff
or just:
colordiff old new
Installation:
sudo apt-get install colordiff
brew install colordiff
port install colordiff
1.4m articles
1.4m replys
5 comments
57.0k users