X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2Fp4.bashrc;h=b4134c084630b0ea0cecc9f65c40f33dd6f0b564;hb=2be8b73f0cbc7eef32fb1cbecbb215890858ccb1;hp=93627f1149afb56110f691da08414da7ae4b2e07;hpb=76559e10296433ab488b9d9940c50a39282ee49a;p=profile.git diff --git a/.profile.d/p4.bashrc b/.profile.d/p4.bashrc index 93627f1..b4134c0 100644 --- a/.profile.d/p4.bashrc +++ b/.profile.d/p4.bashrc @@ -5,14 +5,19 @@ 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 export P4EDITOR=vim fi if [ -z "$DISPLAY" ]; then - export P4MERGE="vim -o -c '3wincmd j' -c 'wincmd L'" + if [ -e "$HOME/.vim/script/p4" ]; then + export P4MERGE="vim -S '$HOME/.vim/script/p4'" + else + export P4MERGE="vim -o -c '3wincmd j' -c 'wincmd L'" + fi else export P4MERGE="p4merge" fi