DIFFERENCE(1)

✨ NAME ✨

okay so difference β€” it compares two strings and prints a colorful diff πŸ’… periodt.


πŸŽ€ SYNOPSIS πŸŽ€

difference [--split split] orig edit

πŸ’– DESCRIPTION πŸ’–

bestie. listen. difference takes your orig string and your edit string, looks at them side by side, and prints out a colorful representation of the difference straight to standard output ✨

that's it. that's the whole vibe. two strings go in, pretty diff comes out πŸ¦‹


πŸ¦‹ OPTIONS πŸ¦‹

  • -s, --split char|word|line β€” picks how zoomed-in the diff gets, like choosing your camera lens on the level of detail πŸ” (default: word).

🌸 EXAMPLES 🌸

okay so before we get into it: in these examples, the text that would be printed in red is formatted in italics, and the text that would be printed in green is formatted bold. iykyk πŸ’…

compare characters:

$ difference --split char brown green
bgroween

compare words:

$ difference --split word brown green
brown green
$ difference --split word "The quick brown fox jumps over the lazy dog." "The huge brown fox is cool."
The quick huge brown fox jumps over the lazy dog. is really cool.

compare lines:

$ difference --split word brown green
brown
green
$ difference --split word "The quick brown fox jumps over the lazy dog." "The huge brown fox is cool."
The quick brown fox jumps over the lazy dog.
The huge brown fox is cool.
$ difference --split line "Roses are red, violets are blue,
> I wrote this library here,
> just for you.
> (It's true)." "Roses are red, violets are blue,
> I wrote this documentation here,
> just for you.
> (It's quite true)."
Roses are red, violets are blue,
I wrote this library here,
I wrote this documentation here,
just for you.
(It's true).
(It's quite true).

and that's the whole page bestie 🫢 this was DIFFERENCE(1) from the General Commands Manual, dated 2019-01-23 β€” go forth and diff slay πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from