]> git.pld-linux.org Git - packages/bash.git/commitdiff
- xterm title done PROPER way auto/ac/bash-3_0-6
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 10 Jun 2005 13:08:43 +0000 (13:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bashrc -> 1.21

bashrc

diff --git a/bashrc b/bashrc
index 8edf0b5717c07e25dcea0825ca31bbf1f9e799c6..f35cee65d44fa45ef21e661bdf8daf5b0bc0d022 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,15 +3,16 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# We set PS1 for each terminal:
+# If this is an xterm set the title to user@host:dir
 case $TERM in
-       gnome|nxterm|xterm*|rxvt)
-               PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
+       gnome|nxterm|xterm*|rxvt*)
+               PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
                ;;
        *)
-               PS1="[\u@\h \W]\\$ "
                ;;
 esac
+
+PS1="[\u@\h \W]\\$ "
 export PS1
 
 alias which="type -p"
This page took 0.110049 seconds and 4 git commands to generate.