git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows 64-bit compatibility.
[profile.git]
/
.profile.d
/
p4.bashrc
diff --git
a/.profile.d/p4.bashrc
b/.profile.d/p4.bashrc
index
7cdb1db
..
94cd19c
100644
(file)
--- a/
.profile.d/p4.bashrc
+++ b/
.profile.d/p4.bashrc
@@
-1,4
+1,3
@@
-# $Id: p4.bashrc 151 2008-11-20 13:59:19Z iain $
if [ ! -z "$SUDO_USER" ]; then
export P4USER=$SUDO_USER
export P4TICKETS=/tmp/.p4tickets.$SUDO_USER
if [ ! -z "$SUDO_USER" ]; then
export P4USER=$SUDO_USER
export P4TICKETS=/tmp/.p4tickets.$SUDO_USER
@@
-6,8
+5,13
@@
else
export P4USER=$USER
fi
export P4CONFIG=.p4config
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
if [ -z "$DISPLAY" ]; then
export P4MERGE="vim -o -c '3wincmd j' -c 'wincmd L'"
else