X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.profile.d%2Fprompt.bashrc;h=da94e9713961f88393172d8c7753cde0270e0d7e;hp=44773fc9b4411900c8f141a725eece13a96fac29;hb=094bc317ad7d7907a5c87477530db4d24bf1c534;hpb=0614eba6741fe0b5f1ef54ad7478fe003ca0e613 diff --git a/.profile.d/prompt.bashrc b/.profile.d/prompt.bashrc index 44773fc..da94e97 100644 --- 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= - 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 @@ -30,7 +30,7 @@ if ps -o comm= -p $PPID 2>/dev/null | grep '^vim*$' &>/dev/null; then trap "echo -ne '\\033]0;$info\\033\\0134'" exit info="$info$vimchild" fi -if [ "${TERM##screen}" = "$TERM" ]; then +if [ "${TERM##screen}" = "$TERM" -o "${TERM%%-bce}" = "$TERM" ]; then PROMPT_COMMAND="echo -ne '\033]0;$info\033\0134\r\033[K'" else PROMPT_COMMAND='echo -ne "\033k\033\0134"'