Tag Archives: diff

Diff Tools, Redux

Some time ago, I mentioned here how I like to use colordiff. Well, on a Mac I actually prefer Apple’s FileMerge GUI diff tool, which is is part of the Xcode command line tools, and accessible from the command line as opendiff.)

I recently discovered diffy, which is similar to colordiff, but offers a -split option that gives you the side-by-side effect of opendiff.

Even more interesting to me, however, is diffr, which is a “diff postprocessor” that shows the differences within a specific line. You run diff -u ... | diffr to see what you want.

Thousands of words worth of pictures:

plain old diff
colordiff (aliased to diff because duh)
diffy -s split
diff -u … | diffr
FileMerge, invoked from the command line

Update: I appear to have been wrong. Evidently, opendiff is part of Xcode proper, not the command line tools. Which means I won’t be using it in general, because it’s freaking huge.

Diff Tools

My favorite diff tool is FileMerge, one of Apple’s developer tools, which can be accessed from the command line as opendiff.

But from the command line, my (next most) favorite diff tool is colordiff. It’s called that because it color-codes the output when it’s used interactively, making it IMHO easier to see what’s changed. Actually, colordiff is just a wrapper around the real diff tool.

Another nice tool is dwdiff, which is compares two documents and highlights the different words rather than the different lines. So does wdiff.

(Back to my list of Unixy tools for the Mac.)