How to get a colorful
First install the program
aptitude install colordiff
Now SVN must be told to use
colordiff, so edit your
~/.subversion/config and add the line
diff-cmd = colordiff
[helpers] section (usually there is a commented template you can use). Now the output of
will be a colorful representation of your changes.
However, this creates one problem when piped to
less, because it shows the escape characters with caret notation. Therefore the command line parameter
-R is used to display ANSI color escape sequences as colors. Set the environment variable
LESS with this option.
One more improvement:
less wraps the lines at screen width which is often not desired. Therefore use the switch
-s to get a line-by-line output. For a permanent setting, put
~/.bashrc or system wide to
One more tip: A recursive search in an SVN working copy with
grep also reveals occurences in the internal "backup" files. Therefore the following alias excludes the
.svn subdirectory (and backup files of your editor and compiled Python files).
alias rsgrep='rgrep --exclude-dir=.svn --exclude=*~ --exclude=*.pyc'