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 *.h print the changes between current source files and their latest RCS-versions. main character energy, honestly πŸ’…
  • enscript -G2re --filter='diff %s~ %s | diffpp %s' *.c *.h print 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