]> git.pld-linux.org Git - packages/bash.git/blobdiff - bashrc
oops
[packages/bash.git] / bashrc
diff --git a/bashrc b/bashrc
index 9c52184b86f529be6855ae472d8edb057a44b44b..85fe46fd773be5833358727644fc133c5bc3bff9 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,17 +3,16 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# If shell is run in environment without set PS1
-if [ ! "$PS1" ]; then
-       case $TERM in
-               gnome|xterm*|rxvt)
-                       PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
-                       ;;
-               *)
-                       PS1="[\u@\h \W]\\$ "
-                       ;;
-       esac
-fi
+# We set PS1 for each terminal:
+case $TERM in
+       gnome|nxterm|xterm*|rxvt)
+               PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
+               ;;
+       *)
+               PS1="[\u@\h \W]\\$ "
+               ;;
+esac
+export PS1
 
 alias which="type -p"
 
@@ -23,4 +22,4 @@ for i in `find /etc/shrc.d -name '*.sh'` ; do
 done
 unset i
 
-stty erase `tput kbs`
+[ "`LC_ALL= tty`" = "not a tty" ] || stty erase `tput kbs`
This page took 0.060379 seconds and 4 git commands to generate.