showing differences within a line in diff output

Brian Harris picture Brian Harris · Aug 27, 2009 · Viewed 11.9k times · Source

This StackOverflow answer has an image of KDiff3 highlighting intra-line differences. Does someone know of a tool which can show the same (ex, via color) on the command line?

Another way to think of this is wanting to diff each difference in a patch file.

Answer

ire_and_curses picture ire_and_curses · Aug 27, 2009

I don't know if this is sufficiently command line for your purpose, but vimdiff can do this (even does colour). See for example the image in this related question.