Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 51810fb8a9c6bb4d2508289837f958c8 > files > 7

setup-2.5.58-9.el5.src.rpm

diff -urNp setup-2.5.58-orig/bashrc setup-2.5.58/bashrc
--- setup-2.5.58-orig/bashrc	2011-09-22 11:44:34.279665238 +0200
+++ setup-2.5.58/bashrc	2011-09-22 11:47:49.530538741 +0200
@@ -13,6 +13,7 @@ fi
 
 # are we an interactive shell?
 if [ "$PS1" ]; then
+  if [ -z "$PROMPT_COMMAND" ]; then
     case $TERM in
 	xterm*)
 		if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
@@ -32,9 +33,10 @@ if [ "$PS1" ]; then
 		[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
 	    ;;
     esac
-    # Turn on checkwinsize
-    shopt -s checkwinsize
-    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
+  fi
+  # Turn on checkwinsize
+  shopt -s checkwinsize
+  [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
 fi
 
 if ! shopt -q login_shell ; then # We're not a login shell