Created
January 31, 2013 08:46
-
-
Save anantpatil/4681397 to your computer and use it in GitHub Desktop.
Colored svn diff command. When using a "svn diff", its easy to see the differences based on color instead of based on + or - symbol in the beginning of the line. Usage: $svndiff <file name>
This file contains 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
#!/bin/sh | |
# Output colored text | |
# Color the contents of working copy green and old copy red. | |
svn diff $* | sed -e 's/^+/\x1b\[32m+/;s/^-/\x1b[31m-/;s/$/\x1b[0m/'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment