DIFFPP(1)
π DIFFPP π
ok bestie, welcome to diffpp(1) β the little cutie that makes your diff outputs actually pretty when you print them. it's giving glow-up for your terminal output, no cap β¨
πΈ NAME πΈ
diffpp β pretty-print diff outputs with GNU enscript π
π¦ SYNOPSIS π¦
diffpp currentfile < diff-file
that's it. that's the whole vibe. currentfile is the file you're diffing against, and the diff itself comes in on stdin. slay π
β¨ DESCRIPTION β¨
okay so here's the tea β β diffpp takes the output files from the diff(1) program and converts them into a format that's suitable to be printed with GNU enscript(1). literally the matchmaker between your diffs and your printer, fr fr.
the way it works is iconic: the program annotates the changes with enscript's special escapes, so enscript knows how to highlight the modified portions of the file. chef's kiss π
and what does the highlighting look like? here's the rundown:
- all changed and added lines get printed with a gray-background π©Ά β so they pop off the page
- deleted lines are marked with minus (
-) characters - and diffpp prints one minus character for each deleted line β one
-per deleted line, that's the rule, periodt π―
π EXAMPLES π
the easiest way to use diffpp is to use it as an input filter for enscript. lowkey the bestie move. here's why it's so clean: if an input filter is specified for enscript, it gets used to pre-process the incoming data-stream. and filtering does not alter any header strings or file-timestamps which might be printed on enscript headers β only the incoming data is modified. so your headers stay pristine, your data gets the makeover β¨
enscript -G2re --filter='rcsdiff %s | diffpp %s' *.c *.hprint the changes between current source files and their latest RCS-versions. main character energy, honestly πenscript -G2re --filter='diff %s~ %s | diffpp %s' *.c *.hprint changes between source files and the corresponding backup-files. obsessed with this one π«Ά
π SEE ALSO π
go read those too, iykyk π
π AUTHOR π
Markku Rossi <mtr@iki.fi> <http://www.iki.fi/~mtr/>
absolute legend, we stan π
ok that's the whole page bestie!! this was the DIFFPP manual, dated Jan 29, 1997 β yeah she's vintage, and she ate regardless π β¨ no cap, go print something pretty π¦πΈ
π¦ where this page comes from
- alpine 3.24: enscript-doc 1.6.6-r7 Β· GPL-3.0-only
- arch rolling: enscript 1.6.6-6 Β· GPL3
- centos-stream 10: enscript 1.6.6-36.el10 Β· LGPL-2.0-or-later AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LGPL-2.1-or-later
- centos-stream 9: enscript 1.6.6-28.el9 Β· GPLv3+ and LGPLv2+ and GPLv2+
- debian bookworm: enscript 1.6.5.90-3+b1
- debian trixie: enscript 1.6.5.90-3.1+b1
- fedora 43: enscript 1.6.6-37.fc43 Β· LGPL-2.0-or-later AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LGPL-2.1-or-later
- fedora 44: enscript 1.6.6-38.fc44 Β· LGPL-2.0-or-later AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LGPL-2.1-or-later
- nixos 26.05: enscript 1.6.6
- nixpkgs unstable: enscript 1.6.6
- opensuse-leap 16.0: enscript 1.6.6-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: enscript 1.6.6-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: enscript 1.6.6-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: enscript 1.6.6-bp160.1.12 Β· GPL-3.0-or-later
- ubuntu jammy: enscript 1.6.5.90-3
- ubuntu noble: enscript 1.6.5.90-3.1
- ubuntu questing: enscript 1.6.5.90-3.2
- ubuntu resolute: enscript 1.6.5.90-3.2build1
- ubuntu stonking: enscript 1.6.5.90-3.2build1
- Copyright (c) 1996 Markku Rossi
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms