X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2Fp4.bashrc;h=94cd19c606b7a44c7c432714c012077dcc11477d;hb=02efc2028bc26a550d3b01adfab2c03dbf3bcf2e;hp=0422ee85858e4db642ecfdb4046a3061c38ce4f4;hpb=819bb88d5a014a23150b8fd609d194e883958674;p=profile.git diff --git a/.profile.d/p4.bashrc b/.profile.d/p4.bashrc index 0422ee8..94cd19c 100644 --- a/.profile.d/p4.bashrc +++ b/.profile.d/p4.bashrc @@ -5,10 +5,15 @@ else export P4USER=$USER fi export P4CONFIG=.p4config -export P4DIFF="diff -u" -export P4EDITOR="vim -S '$HOME/.vim/script/p4'" +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'" else - export P4MERGE="p4v -merge" + export P4MERGE="p4merge" fi