clean up titles and prompts

This commit is contained in:
David Alexander Majnemer 2009-01-20 22:24:52 -06:00
parent acf4c6e796
commit 23d4b7898c
3 changed files with 8 additions and 9 deletions

View file

@ -14,10 +14,10 @@ function do_prompt ()
local TITLEBAR local TITLEBAR
case $TERM in case $TERM in
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]' TITLEBAR='\[\033]1;\u@\h:\w\007\033]2;\u@\h:\w\007\]'
;; ;;
screen*) screen*)
TITLEBAR='\[\033k\033\134\033k\u@\h:\w\033\134\]' TITLEBAR='\[\033k\u@\h:\w\033\134\]'
;; ;;
*) *)
TITLEBAR='' TITLEBAR=''

View file

@ -10,10 +10,10 @@ fi
case $TERM in case $TERM in
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
TITLE=']0;${USER}:${PWD}' TITLE=']1;${USER}:${PWD}]2;${USER}:${PWD}'
;; ;;
screen*) screen*)
TITLE='k\\k${USER}:${PWD}\\' TITLE='k${USER}:${PWD}\\'
;; ;;
*) *)
TITLE='' TITLE=''

View file

@ -56,15 +56,14 @@ function title
{ {
case $TERM in case $TERM in
screen*) screen*)
# Use these two for GNU Screen: # Use this for GNU Screen:
print -nR $'\ek'$1$'\e'"\\" print -nR $'\ek'$2$'\e'"\\"
shift
print -nR $'\e_screen \005 | '$*$'\e'"\\"
;; ;;
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
# Use this one instead for everybody else: # Use this one instead for everybody else:
shift shift
print -nR $'\e]0;'$@$'\a' print -nR $'\e]1;'$@$'\a'
print -nR $'\e]2;'$@$'\a'
;; ;;
esac esac
} }