Date: Sat, 06 Feb 2010 18:42:13 -0800 From: perryh@pluto.rain.com To: kamikaze@bsdforen.de, m.seaman@black-earth.co.uk Cc: guru@unixarea.de, freebsd-questions@freebsd.org Subject: Re: backup terminal title Message-ID: <4b6e2885.uAuY%2Ba00oT7AqSzy%perryh@pluto.rain.com> In-Reply-To: <4B6D9B6B.40800@bsdforen.de> References: <4B6D62B3.4070702@bsdforen.de> <20100206125554.GA2173@current.Sisis.de> <4B6D74EF.2090106@bsdforen.de> <4B6D80F3.7050707@black-earth.co.uk> <4B6D8377.1090005@bsdforen.de> <4B6D9B6B.40800@bsdforen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> I wish to use the "\033]0;%s\007" sequence in a shell-script to > set the title of a terminal. But only if I am able to undo it. > > My requirement is that this must be done without using anything > outside the base system. There is an escape sequence which will cause the terminal to echo back its current title, but it's a bit tricky to use given only base-system tools because the echo ends with, IIRC, \007 rather than \n. It may be possible in some shells to temporarily set the line-end character to \007. You probably also want to (somehow) cover problematic cases like terminals that don't reply to the inquiry even though TERMCAP implies that they should.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4b6e2885.uAuY%2Ba00oT7AqSzy%perryh>