From: Iain Patterson Date: Tue, 4 Aug 2009 14:54:40 +0000 (+0100) Subject: colordiff. X-Git-Url: http://git.iain.cx/?p=profile.git;a=commitdiff_plain;h=1d8d630522282efbefe26e1e8c5a150b9d51d276 colordiff. --- diff --git a/.colordiffrc b/.colordiffrc new file mode 100644 index 0000000..f40430a --- /dev/null +++ b/.colordiffrc @@ -0,0 +1,5 @@ +plain=normal +newtext=darkcyan +oldtext=darkred +diffstuff=darkyellow +cvsstuff=darkgreen diff --git a/.profile.d/diff.bashrc b/.profile.d/diff.bashrc new file mode 100644 index 0000000..af307ce --- /dev/null +++ b/.profile.d/diff.bashrc @@ -0,0 +1,5 @@ +colordiff=$(find_working colordiff 2>/dev/null) +if [ $? = 0 ]; then + alias diff="$colordiff" +fi +unset colordiff diff --git a/.profile.d/p4.bashrc b/.profile.d/p4.bashrc index 93627f1..94cd19c 100644 --- a/.profile.d/p4.bashrc +++ b/.profile.d/p4.bashrc @@ -5,7 +5,8 @@ else export P4USER=$USER fi export P4CONFIG=.p4config -export P4DIFF="diff -u" +eval $(alias diff 2>/dev/null | sed 's/^alias diff/P4DIFF/') +export P4DIFF="${P4DIFF:-diff} -u" if [ -e "$HOME/.vim/script/p4" ]; then export P4EDITOR="vim -S '$HOME/.vim/script/p4'" else