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
Try to change to directory from which become was run.
[profile.git]
/
.profile.d
/
prompt.bashrc
diff --git
a/.profile.d/prompt.bashrc
b/.profile.d/prompt.bashrc
index
6398e3d
..
2145c22
100644
(file)
--- a/
.profile.d/prompt.bashrc
+++ b/
.profile.d/prompt.bashrc
@@
-4,8
+4,8
@@
SSH_FORWARDED=$(get_remote_ip)
if [ ! -z "$SSH_FORWARDED" ]; then
if [ "$SSH_FORWARDED" = "localhost" ]; then
SSH_FORWARDED=
if [ ! -z "$SSH_FORWARDED" ]; then
if [ "$SSH_FORWARDED" = "localhost" ]; then
SSH_FORWARDED=
- elif [ -f
~
/.ssh/forwarded ]; then
- for forwarded in $(<
~
/.ssh/forwarded); do
+ elif [ -f
${PROFILE_HOME:-~}
/.ssh/forwarded ]; then
+ for forwarded in $(<
${PROFILE_HOME:-~}
/.ssh/forwarded); do
if echo "$SSH_FORWARDED" | grep "$forwarded" &>/dev/null; then
SSH_FORWARDED=
fi
if echo "$SSH_FORWARDED" | grep "$forwarded" &>/dev/null; then
SSH_FORWARDED=
fi
@@
-31,9
+31,9
@@
if ps -o comm= -p $PPID 2>/dev/null | grep '^vim*$' &>/dev/null; then
info="$info$vimchild"
fi
if [ "${TERM##screen}" = "$TERM" ]; then
info="$info$vimchild"
fi
if [ "${TERM##screen}" = "$TERM" ]; then
-
export
PROMPT_COMMAND="echo -ne '\033]0;$info\033\0134\r\033[K'"
+ PROMPT_COMMAND="echo -ne '\033]0;$info\033\0134\r\033[K'"
else
else
-
export
PROMPT_COMMAND='echo -ne "\033k\033\0134"'
+ PROMPT_COMMAND='echo -ne "\033k\033\0134"'
fi
unset blank info vimchild SSH_FORWARDED
fi
unset blank info vimchild SSH_FORWARDED