On Sat, Feb 06, 2010 at 01:38:11PM +0100, Dominic Fandrey wrote: > I just started to wonder how portmaster changes the window title > of my terminal and why it doesn't change it back when it > terminates. > > Some digging in the portmaster code showed up an escape sequence: > printf "\033]0;%s\007" "YOUR TEXT GOES HERE" > > Unfortunately I am entirely clueless as to how one could backup > the old title string to restore it upon termination. It seems > to me this ought to be a precondition to using this kind of > feature.
It "can", depending - some people object to the control sequence which
can retrieve the previous value. I added a push/pop stack for xterm last
year which can work around that (transparently). I used that in vile
(vi like emacs), and I made a fix for 'screen' which uses it.
see
http://invisible-island.net/xterm/xterm.log.html#xterm_251
For other terminals - some have disabled the objectionable feature,
some have not. (Some will eventually copy the push/pop feature ;-)
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
pgpdNZr7YsZSr.pgp
Description: PGP signature
