Steven Brown wrote: > I'd like to set the title I've assigned a given window (via C-a A) in my > prompt just like I can currently set $WINDOW. Is there a way to do > this? I read the manual section on setting screen titles, but it seemed > to be from an xterm title perspective and also melted my brain. :)
I'm not sure I understand your request (how do you set $WINDOW?),
but maybe you just want to
echo -e -n '\033khello world\033\\'
(or put an escape, then k, then your title, then escape and a
backslash into your prompt).
While my .zshrc is set up to echo "zsh (tty-number)" in the
prompt, it also does this fine precmd (which is executed directly
before the current line gets executed):
TTYSTRING=$(tty|sed -e 's,/dev/,,' -e 's/tty//')
export TTYSTRING
function preexec {
if [ "$TERM" = "screen" ] ; then
local y
y=(${(s: :)1})
echo -e -n "\033k$y[1] ($TTYSTRING)\033\\"
fi
}
Ciao,
Thomas
--
Thomas Köhler Email: [EMAIL PROTECTED]
<>< WWW: http://gott-gehabt.de
IRC: tkoehler
PGP public key available from Homepage!
signature.asc
Description: Digital signature
_______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
