From 5a75056fdf9d875359b85b13388a93bdc713b815 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 16 Nov 2011 10:24:34 -0800 Subject: [PATCH] xterm title HOSTNAME support, bug #390699 --- pym/_emerge/JobStatusDisplay.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py index 1949232e7..877a0c963 100644 --- a/pym/_emerge/JobStatusDisplay.py +++ b/pym/_emerge/JobStatusDisplay.py @@ -289,4 +289,11 @@ class JobStatusDisplay(object): self._update(color_output.getvalue()) if self.xterm_titles: - xtermTitle(" ".join(plain_output.split())) + # If the HOSTNAME variable is exported, include it + # in the xterm title, just like emergelog() does. + # See bug #390699. + title_str = " ".join(plain_output.split()) + hostname = os.environ.get("HOSTNAME") + if hostname is not None: + title_str = "%s: %s" % (hostname, title_str) + xtermTitle(title_str) -- 2.26.2