From owner-freebsd-questions@FreeBSD.ORG Sat Feb 6 13:14:16 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F9A8106566B for ; Sat, 6 Feb 2010 13:14:16 +0000 (UTC) (envelope-from dickey@saltmine.radix.net) Received: from saltmine.radix.net (saltmine.radix.net [207.192.128.40]) by mx1.freebsd.org (Postfix) with ESMTP id F3BCA8FC08 for ; Sat, 6 Feb 2010 13:14:15 +0000 (UTC) Received: from saltmine.radix.net (localhost [127.0.0.1]) by saltmine.radix.net (8.12.2/8.12.2) with ESMTP id o16DECV4015365; Sat, 6 Feb 2010 08:14:12 -0500 (EST) Received: (from dickey@localhost) by saltmine.radix.net (8.12.2/8.12.2/Submit) id o16DECpo015364; Sat, 6 Feb 2010 08:14:12 -0500 (EST) Date: Sat, 6 Feb 2010 08:14:12 -0500 From: Thomas Dickey To: Dominic Fandrey Message-ID: <20100206131412.GA14340@saltmine.radix.net> References: <4B6D62B3.4070702@bsdforen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <4B6D62B3.4070702@bsdforen.de> User-Agent: Mutt/1.3.27i Cc: freebsd-questions@freebsd.org Subject: Re: backup terminal title X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 13:14:16 -0000 --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--