Created attachment 416820 [details, diff] Terminal title code enhancement Currently, the code to set the title or status line of the terminal has hard-coded escape sequences and a regexp to match $TERM [1]. This is a problem if you happen to be using a terminal which either isn't on the list (e.g., #497902) or has a different way of setting the title/status line. Rather than occasionally adding terms to this regexp as terminals come into and out of fashion, it would be helpful to have a smarter, more robust solution. There is a semi-standard terminfo method to set the title/status line: tsl and fsl. Although these appear in the terminfo database for a few notable terminals (e.g., rxvt-unicode, xterm+sl, st, screen-256color-s), they *do not* appear in the more common TERMs such as xterm. Despite this, it would be easier to implement functionality respecting this pseudo-standard and point to it any time someone comes in complaining that their new-fangled terminal doesn't get status updates. That is, shift the burden of maintenance to the users. There are a few who are already advocating for appending to terminfo entries [2]. Of course, we wouldn't want to break the existing functionality, so the regexp could still be a fallback, just with the understanding that it's there for historical reasons. This is what is implemented in the above patch. [1] https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/output.py#n237 [2] https://gist.github.com/KevinGoodsell/744284#file-terminals-txt-L106