From: Jan Rękorajski Date: Fri, 10 Jun 2005 13:08:43 +0000 (+0000) Subject: - xterm title done PROPER way X-Git-Tag: auto/ac/bash-3_0-6 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=refs%2Ftags%2Fauto%2Fac%2Fbash-3_0-6;p=packages%2Fbash.git - xterm title done PROPER way Changed files: bashrc -> 1.21 --- diff --git a/bashrc b/bashrc index 8edf0b5..f35cee6 100644 --- 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"