DIFFR(1)

✨ NAME ✨

diffr β€” okay so literally what it does is it adds word-level diff on top of unified diffs. that's it, that's the whole vibe check. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

diffr [--colors <color_spec>] [--line-numbers <compact|aligned>]

diff -u | diffr [OPTIONS]

git show | diff [OPTIONS]

🌸 DESCRIPTION 🌸

--colors <color_spec>

bestie this is where you configure color settings for console ouput. yes it says "ouput", we don't talk about it, moving on. πŸ™ˆ

there are four faces to customize, and they live in a lil 2Γ—2 grid β€” one column is the + side, other column is the - side:

  • the line prefix face β†’ + and -
  • the common segment face β†’ added and removed
  • the unique segment face β†’ refine-added and refine-removed

and the customization lets you:

  • change the foreground or background color;
  • set or unset the attributes bold, intense, underline;
  • clear all attributes.

you do the customization by passing a color_spec argument. and yes queen, this flag may be provided multiple times β€” stack 'em. πŸ‘‘

the syntax is, and I quote, the following:

color_spec = face-name + ':' + attributes
attributes = attribute
           | attribute + ':' + attributes
attribute  = ('foreground' | 'background') + ':' + color
           | (<empty> | 'no') + font-flag
           | 'none'
font-flag  = 'italic'
           | 'bold'
           | 'intense'
           | 'underline'
color      = 'none'
           | [0-255]
           | [0-255] + ',' + [0-255] + ',' + [0-255]
           | ('black', 'blue', 'green', 'red',
              'cyan', 'magenta', 'yellow', 'white')

so for example, this color_spec right here:

'refine-added:background:blue:bold'

sets the color of unique added segments with a blue background, written with a bold font. it's giving very readable, no cap. ✨

--line-numbers <compact|aligned>

this one displays line numbers. the style is optional, which is so chill of it.

  • when style = compact, it takes as little width as possible. skinny legend behavior.
  • when style = aligned, it aligns to tab stops β€” which is genuinely useful if tab is used for indentation.
[default: compact] πŸ’–

the lil helper flags 🫢

  • -h, --help β€” prints help information. your bestie when you're lost.
  • -V, --version β€” prints version information. for the receipts. πŸ“Έ

πŸ’œ AUTHOR πŸ’œ

Nathan Moreau <nathan.moreau@m4x.org>


πŸŽ€ LICENSE πŸŽ€

The MIT License (MIT)


okay that's the whole page, you ate it, go diff something πŸ“

this was diffr 1.5.0, dated April 14, 2023 β€” stan a classic, periodt. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from