Created
March 29, 2016 10:01
-
-
Save ProGM/f06d78e17ae80b6eac02 to your computer and use it in GitHub Desktop.
A script to run git-diff per character/words.
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 | |
if [[ $1 == 'words' ]]; then | |
git diff --color-words="[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+" | |
elif [[ $1 == 'nospace' ]]; then | |
git diff --color-words=. | |
else | |
git diff --color-words | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment