]> git.pld-linux.org Git - packages/bash.git/commitdiff
- copy/paste bash part from profile
authorPaweł Gołaszewski <blues@pld-linux.org>
Thu, 26 May 2005 10:49:06 +0000 (10:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bashrc -> 1.13

bashrc

diff --git a/bashrc b/bashrc
index b5c245d166501f220b465b5d3e1efcc5e248f49a..9c52184b86f529be6855ae472d8edb057a44b44b 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,10 +3,17 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# For some unknown reason bash refuses to inherit
-# PS1 in some circumstances that I can't figure out.
-# Putting PS1 here ensures that it gets loaded every time.
-#PS1="[\u@\h \W]\\$ "
+# 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
 
 alias which="type -p"
 
This page took 0.031406 seconds and 4 git commands to generate.