From 5633dbd71e356bd0539122556ef7630518b94cbf Mon Sep 17 00:00:00 2001 From: David Alexander Majnemer Date: Fri, 16 Jan 2009 14:38:56 -0500 Subject: [PATCH] add support for a lot more terms and screen for bash's titles --- bash/title_prompt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bash/title_prompt b/bash/title_prompt index f9dbcec..ba989f0 100755 --- a/bash/title_prompt +++ b/bash/title_prompt @@ -10,15 +10,21 @@ function do_prompt () else BASE="#" fi + + local TITLEBAR case $TERM in - xterm*) + xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) TITLEBAR='\[\033]0;\u@\h:\w\007\]' ;; + screen*) + TITLEBAR='\[\033k\033\134\033k\u@\h:\w\033\134\]' + ;; *) TITLEBAR='' ;; esac - export PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]" + PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]" + export PS1 } PROMPT_COMMAND=do_prompt