tags:

views:

37

answers:

2

Setting terminal title is easy with echo -e "\e]0;some title\007". Works with pretty much every terminal program.

What I want is to set terminal title when some program starts - and restore old one when it finishes. Is this possible?

+2  A: 

Yes, that is possible indeed. See a xterm reference manual (like this for example) and wander your way through it. xterm even has a build in stack for this, so you don't have to store the title manually.

RWS
A: 

There are some terminal programs that supporting it (xterm has compile time options for that, as mentioned by RWS), but most terminal programs simply lack such feature, including in particular Terminal.app.

taw