backup terminal title

Dominic Fandrey kamikaze at
Sat Feb 6 12:38:14 UTC 2010

I just started to wonder how portmaster changes the window title
of my terminal and why it doesn't change it back when it

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

A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 

More information about the freebsd-questions mailing list