diff --git a/bash/title_prompt b/bash/title_prompt index ba989f0..619ab42 100755 --- a/bash/title_prompt +++ b/bash/title_prompt @@ -14,10 +14,10 @@ function do_prompt () local TITLEBAR case $TERM in 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*) - TITLEBAR='\[\033k\033\134\033k\u@\h:\w\033\134\]' + TITLEBAR='\[\033k\u@\h:\w\033\134\]' ;; *) TITLEBAR='' diff --git a/ksh/title_prompt b/ksh/title_prompt index cd8f613..dcf9c5b 100755 --- a/ksh/title_prompt +++ b/ksh/title_prompt @@ -10,10 +10,10 @@ fi case $TERM in xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) - TITLE=']0;${USER}:${PWD}' + TITLE=']1;${USER}:${PWD}]2;${USER}:${PWD}' ;; screen*) - TITLE='k\\k${USER}:${PWD}\\' + TITLE='k${USER}:${PWD}\\' ;; *) TITLE='' diff --git a/zsh/title b/zsh/title index 4c2bc07..13a1331 100755 --- a/zsh/title +++ b/zsh/title @@ -56,15 +56,14 @@ function title { case $TERM in screen*) - # Use these two for GNU Screen: - print -nR $'\ek'$1$'\e'"\\" - shift - print -nR $'\e_screen \005 | '$*$'\e'"\\" + # Use this for GNU Screen: + print -nR $'\ek'$2$'\e'"\\" ;; xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*) # Use this one instead for everybody else: shift - print -nR $'\e]0;'$@$'\a' + print -nR $'\e]1;'$@$'\a' + print -nR $'\e]2;'$@$'\a' ;; esac }