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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Man pages for
diffsuggest no solution for colorization from within itself. Please consider usingcolordiff. It’s a wrapper arounddiffthat produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability:or just:
Installation:
sudo apt-get install colordiffbrew install colordifforport install colordiff