From 1d8d630522282efbefe26e1e8c5a150b9d51d276 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 4 Aug 2009 15:54:40 +0100 Subject: [PATCH] colordiff. --- .colordiffrc | 5 +++++ .profile.d/diff.bashrc | 5 +++++ .profile.d/p4.bashrc | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .colordiffrc create mode 100644 .profile.d/diff.bashrc 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 -- 2.20.1