Skip to content

Instantly share code, notes, and snippets.

@jmoz
Created August 19, 2009 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoz/170373 to your computer and use it in GitHub Desktop.
Save jmoz/170373 to your computer and use it in GitHub Desktop.
svn diff with colours
# For the colours in the sed replacement to work this is the only way I can get bash to interpret them correctly.
RED=`echo -e '\033[31m'`
GREEN=`echo -e '\033[32m'`
WHITE=`echo -e '\033[37m'`
# Nice simple coloured svn diff.
alias svndiff="svn diff | sed -e \"s/^\([+].*\)/$GREEN\1$WHITE/\" -e \"s/^\([-].*\)/$RED\1$WHITE/\"";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment