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 Software Development Text Processing Filters Utilities
Licenses GPL
Operating Systems POSIX
Implementation Perl

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  28 Mar 2005 14:38
  • Rrelease-after

Changes: 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.

  • Rrelease-mid
  •  04 Jan 2004 07:38
  • Rrelease-after

Changes: 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.

  • Rrelease-mid
  •  16 Jul 2003 14:14
  • Rrelease-after

Changes: 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.

  • Rrelease-mid
  •  26 Mar 2003 15:04
  • Rrelease-after

Changes: 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.

  • Rrelease-mid
  •  06 Mar 2003 14:41
  • Rrelease-after

Changes: 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

Rcomment-before 09 Apr 2003 13:43 Rcomment-trans ja9uar Rcomment-after

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

Rcomment-before 08 Apr 2003 09:08 Rcomment-trans daveewart Rcomment-after

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

Dave.

Rcomment-before 06 Apr 2003 07:48 Rcomment-trans daveewart Rcomment-after

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.

Rcomment-before 31 Mar 2003 00:22 Rcomment-trans aviyag Rcomment-after

great !
simple, lightweight and great !

Rcomment-before 27 Mar 2003 08:33 Rcomment-trans ja9uar Rcomment-after

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 %<-----------

No-screenshot

Project Spotlight

taskwarrior

A command-line to do list manager.

793d96f1478ad77a3869e06f8c6e8d07_thumb

Project Spotlight

Yana 4 PHP Framework

A full scale PHP component framework including ready-to-use plugins.