Skip to content

Please use colour to highlight intra-line differences in the terminal output too

This bug was originally reported by Paul Wise (pabs@debian.org) in Debian bug #908993:

diffoscope uses colour to highlight intra-line differences in the HTML
output but the terminal output only does a colordiff-style output. It
would be nice if the terminal mode could highlight intra-line changes.

The package ccdiff contains a tool that can do intra-line difference
highlighting with `diff -u` style output, but it is written in Perl.

For example, diffoscope only highlights full lines:

$ diffoscope gtranscribe_0.7.1-2.dsc gtranscribe_0.8-1.dsc
--- gtranscribe_0.7.1-2.dsc
+++ gtranscribe_0.8-1.dsc
=E2=94=9C=E2=94=80=E2=94=80 Build-Depends
=E2=94=82 @@ -1 +1 @@
=E2=94=82 -debhelper (>=3D 10), dh-python, python3-all, python3-dbus, pytho=
n3-distutils-extra, python3-gi
=E2=94=82 +debhelper (>=3D 11), dh-python, python3-all, python3-dbus, pytho=
n3-distutils-extra, python3-gi

$ ccdiff -u gtranscribe_0.7.1-2.dsc gtranscribe_0.8-1.dsc
...
-Build-Depends: debhelper (>=3D 10), dh-python, python3-all, python3-dbus, =
python3-distutils-extra, python3-gi
+Build-Depends: debhelper (>=3D 11), dh-python, python3-all, python3-dbus, =
python3-distutils-extra, python3-gi
                               ^
                               \ Only this character is highlighted
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information