bashrc uses <esc>_ as «start» of screen title, <esc>k should be used according to man screen/TITLES BUG #75670 also mentions that screen $TERM should be checked as "screen*", not as "screen" Reproducible: Always Steps to Reproduce: 1. start screen 2. C-a " 3. Look at title :) Actual Results: title of the window is "bash" Expected Results: title should look like user@host:~ $ diff -u /etc/bash/bashrc{.orig,} --- /etc/bash/bashrc.orig 2008-02-03 12:36:19.000000000 +0600 +++ /etc/bash/bashrc 2008-02-03 12:43:11.000000000 +0600 @@ -28,8 +28,8 @@ xterm*|rxvt*|Eterm|aterm|kterm|gnome*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' ;; - screen) - PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' + screen*) + PROMPT_COMMAND='echo -ne "\033k${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' ;; esac
Created attachment 163101 [details, diff] bashrc patch Is there anything wrong with this trivial patch?
i dont particularly care ... if the screen maintainer says it's ok, then it may be committed
I'm totally against dynamically changing the screen window title. The screen window title is actually a name for a window and not something where auxiliary information can be shown. It reflects how the user names his/her screen windows and it can be used to jump to windows by name. Hence it should be constant and never changed by an application. The hardstatus, which is what we currently set, is the correct way for such information. For xterm we also set the hardstatus and xterm propagates it up as the X window title.
I agree, hardstatus may be better place than window name. Maybe, the bug should be resolved as `invalid'.
i think that's what Sven was going for :)
This should probably be documented, or even configurable via useflag.
looks like this was done via bug 359389 http://sources.gentoo.org/app-shells/bash/files/bashrc?r1=1.21&r2=1.22