diff-colorize

A utility to colorize unified and git-style diffs


Description

diff-colorize is a simple utility that syntax-colors and syntax-highlights unified (diff -u) and git-style (diff --git) diff output.

Here's a screenshot showing the colored and highlighted output in xterm.

The default settings require an xterm running in 256-color mode. To achieve this, set your TERM environment variable to “xterm-256color”.

Apple's Terminal does not support 256-color mode. You will have to use 16-color mode. The default TERM value is xterm-color, which means that you are already using 16-color mode.

Here's a screenshot showing the colored and highlighted output in Terminal.

You can customize the colors by setting variables in your environment. Run the program with no input for more information.

Here's a larger screenshot that shows the program in active use (linked to a full-size image):

This screenshot is of an entire 64-row xterm.


Downloads

diff-colorize-1.0b2.tbz
The Python program and BSD-style license, in a bzip2-compressed tarball.
MD5 hash: 88095d011ca7fcca9be5de6534a87352
SHA-1 hash: bfae63a436bccb45d743c0329ad284466eae8dea
diff-colorize-1.0b2.tbz.asc
Detached PGP (GPG) signature of diff-colorize-1.0b2.tbz using public key ID A54AE2A6.
MD5 hash: 774103e5ac1ab18641299424450bce0f
SHA-1 hash: 5bd442fccc3069ff358414720b87cfd2d6bf9d61
diff-colorize-1.0b1.tbz
The Python program and BSD-style license, in a bzip2-compressed tarball.
MD5 hash: 976750a468beec75bb74fa794253b6e9
SHA-1 hash: 91aad280fa2274d4881fcec83e41c5e5089dd6c5
diff-colorize-1.0b1.tbz.asc
Detached PGP (GPG) signature of diff-colorize-1.0b1.tbz using public key ID A54AE2A6.
MD5 hash: 4d074a9497587936dc8b688788c02189
SHA-1 hash: 4f38f6c3ebfc7430596637277489648b627558c8

MD5 and SHA1 signatures were created using OpenSSL 0.9.7l.


Version history

1.0b2

1.0b1


Mercurial repository

If you want to contribute bug-fixes or enhancements to diff-colorize, the easiest way to do that is to clone the Mercurial repository for diff-colorize. To do this, type this command into a terminal:

hg clone http://bitbucket.org/boredzo/diff-colorize

I provide diff-colorize—the application, and its source code—under a three-clause BSD license. For more information, see the file named LICENSE.txt that comes with it.


2008-08-11 http://boredzo.org/diff-colorize
Valid XHTML 1.0! Valid CSS!