Projects / ColorDiff

ColorDiff

ColorDiff is a wrapper for diff. It produces the same output as diff, but with coloured syntax highlighting at the commandline to improve readability. The output is similar to how a diff-generated patch might appear in Vim or Emacs with the appropriate syntax highlighting options enabled. The colour schemes can be read from a central configuration file or from a local user ~/.colordiffrc file.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  28 Mar 2005 14:38

Release Notes: Improved efficiency for diff-type detection, and the addition of a new colour area called 'cvsstuff' that allows an additional colour definition for this type of output. 'long colordiff colour options' has been removed, since it appears to conflict with the use of additional diff command line options. This change also fixes the bug, which means that colordiff returns the 'diff' return value correctly. Inclusion of a separate 'cdiff' shell script for colouring compressed and URL-based diffs.

  •  04 Jan 2004 07:38

Release Notes: Support for "dark" colors was added. Support was added for long command-line options to change colors on the fly. Inconsistent handling of arguments in the input stream was fixed.

  •  16 Jul 2003 14:14

Release Notes: More tolerance of whitespace in the config file. More elegant handling of directories other than '/etc' being the location for the central colordiffrc and preserving a backup of an existing /etc/colordiffrc at installation. Extra documentation for 'less' options.

  •  26 Mar 2003 15:04

Release Notes: Diff identification is now more reliable. Diffs generated by 'subversion' are now recognised, in addition to plain diffs and CVS diffs. The colour 'black' can now also be specified in ~/.colordiffrc for use by those with light-coloured backgrounds.

  •  06 Mar 2003 14:41

Release Notes: Addition of support for 'context' diffs, and a fix for a 'colour over-run' problem when shell prompt has no colours defined.

RSS Recent comments

09 Apr 2003 13:43 ja9uar Thumbs up

Re: colordiffrc

> Hmmm - looks like the patch got mangled
> - sorry. Email me privately at
> davee@sungate.co.uk if you want the
> patch.
>
> Dave.

T'is OK. I entered the changed lines manually at line
#70.

Regards,
Kevin

08 Apr 2003 09:08 daveewart

Re: colordiffrc
Hmmm - looks like the patch got mangled - sorry. Email me privately at davee@sungate.co.uk if you want the patch.

Dave.

06 Apr 2003 07:48 daveewart

Re: colordiffrc

> Nice program! Am nitpicking really :-).
>
> colordiffrc doesn't tolerate blank
> (empty lines) or
> whitespace before variable names.

Oh, OK, seeing as it's a quick fix ... ;-)

Attached patch for colordiff.pl will make it more tolerant of such whitespace:

Index: colordiff.pl
========================================
RCS file: /cvsroot/colordiff/colordiff/src/colordiff.pl,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -r1.4.2.5 -r1.4.2.6
70c70,71
s/^\s+//;
> next if (/^#/ || /^$/);

Note that this patch is for the latest release, version 1.0.2 - and will be included in the next version.

Regards,

Dave - ColorDiff author.

31 Mar 2003 00:22 aviyag Thumbs up

great !
simple, lightweight and great !

27 Mar 2003 08:33 ja9uar Thumbs up

colordiffrc
Nice program! Am nitpicking really :-).

colordiffrc doesn't tolerate blank (empty lines) or
whitespace before variable names.

i.e the following works:

---------------%< cut here %<-----------
# .colordiffrc
#
# Color values
dirstuff=magenta
---------------%< cut here %<-----------

but this doesn't:

---------------%< cut here %<-----------
# .colordiffrc
<--- blank line
# Color values
dirstuff=magenta
^^leading space here
---------------%< cut here %<-----------

Screenshot

Project Spotlight

Watched!

A plugin for Totem Movie Player.

Screenshot

Project Spotlight

SVEditor

An Eclipse-based SystemVerilog Editor.