backup terminal title

Thomas Dickey dickey at radix.net
Sat Feb 6 13:14:16 UTC 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100206/e3e26a8a/attachment.pgp


More information about the freebsd-questions mailing list