Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Feb 2010 08:14:12 -0500
From:      Thomas Dickey <dickey@radix.net>
To:        Dominic Fandrey <kamikaze@bsdforen.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: backup terminal title
Message-ID:  <20100206131412.GA14340@saltmine.radix.net>
In-Reply-To: <4B6D62B3.4070702@bsdforen.de>
References:  <4B6D62B3.4070702@bsdforen.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> Some digging in the portmaster code showed up an escape sequence:
> printf "\033]0;%s\007" "YOUR TEXT GOES HERE"
>=20
> 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 ;-)

--=20
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--sm4nu43k4a2Rpi4c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (SunOS)
Comment: For info see http://www.gnupg.org

iD8DBQFLbWsjtIqByHxlDocRAllMAKCJvPAdGMZvVGsokaP8UCUBX8enMQCdHpsF
aWeaC2w+uW9n6Dl39oyCveo=
=k42X
-----END PGP SIGNATURE-----

--sm4nu43k4a2Rpi4c--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100206131412.GA14340>