Diff Tools

colordiff – colourise diff output

colordiff wraps the standard diff utility and adds colour highlighting while retaining diff’s familiar output and command-line behaviour. It is intended to make patches and comparisons easier to scan without requiring users to adopt a different comparison tool or output format.

The utility can be invoked wherever diff would normally be used or placed later in a pipeline to colourise existing diff output. Colour rules can be configured globally or per user.

This is free and open source software.

Key Features

  • Passes ordinary diff options through to the underlying diff utility.
  • Adds ANSI colour highlighting while preserving the structure of the original comparison.
  • Handles plain, context, unified and side-by-side diff formats.
  • Recognises wdiff output and can colourise added and removed words.
  • Supports Debian-style diffs in addition to common diff formats.
  • Can automatically determine the input diff type or be told explicitly which format to expect.
  • Supports central configuration and per-user settings through a colordiff configuration file.
  • Allows colours for different elements of the diff to be customised.
  • Supports standard named colours as well as extended terminal colour configurations.
  • Can disable colour escape sequences when its output needs to be passed to another program such as patch.
  • Works well with terminal pagers such as less when colour-preserving options are enabled.
  • Can be aliased to diff for users who want coloured comparisons by default.
  • Handles file and directory comparisons supported by the underlying diff implementation.

Website: github.com/daveewart/colordiff
Support:
Developer: Dave Ewart
License: GNU General Public License v2.0

colordiff
Click for full size image

colordiff is written in Perl. Learn Perl with our recommended free books and free tutorials.


Related Software

Terminal-Based Diff Tools
difftasticStructural diff tool that compares files based on their syntax
hunkTerminal diff viewer with syntax highlighting and side-by-side views
diff-so-fancyAttractive diffs with diff-highlight and more
deltaViewer for git and diff output
icdiffAn improved colored diff
diffoscopeIn-depth comparison of files, archives, and directories
colordiffWrapper for diff with pretty syntax highlighting
diffsitterSemantic diff tool
objdiffLocal diffing tool for decompilation project
ydiffTool to view colored, incremental diff in a version controlled workspace
diffrWord-by-word diff highlighting utility
dyffdiff tool for YAML files
WdiffWordwise implementation of diff
dwdiffdiff program that operates at the word level
diffymlCompares YAML documents by their structure
oyoStep-through diff viewer
diff2html-cliGenerate HTML diffs
biodiffTerminal-based binary diff viewer
dirdiffCompute the differences between two directories
csvdiffFast diff tool for comparing CSV files
VBinDiffVisual binary diff
riffWrapper around diff
csv-diffDiffing CSV and JSON files
xmldiffCompare XML documents
PatdiffFile diff using the Patience Diff algorithm
dead-ringerBinary diff utility
sesdiffGenerates a shortest edit script
semdiffSemantic diff tool written in Rust

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted