-
-
Save factorin-j/8bc09683c6f81e5b02b7951079e1ec68 to your computer and use it in GitHub Desktop.
Diff command wrapper to add output color.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
diff -u $@ | sed "s/^-/`echo -e \"\x1b\"`[31m-/;s/^+/`echo -e \"\x1b\"`[32m+/;s/^@/`echo -e \"\x1b\"`[34m@/;s/$/`echo -e \"\x1b\"`[0m/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment