From 337f4de4c1bfb38e02a9f2b5be05884e68299d01 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Jun 2007 01:41:54 +0000 Subject: [PATCH] Print hostname in xterm title if HOSTNAME is exported in the environment (trunk r5976) svn path=/main/branches/2.1.2/; revision=6929 --- bin/emerge | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/emerge b/bin/emerge index 3ba0e9e51..4e3197bf0 100755 --- a/bin/emerge +++ b/bin/emerge @@ -204,10 +204,11 @@ shortmapping={ def emergelog(xterm_titles, mystr, short_msg=None): if xterm_titles: - if short_msg: - xtermTitle(short_msg) - else: - xtermTitle(mystr) + if short_msg == None: + short_msg = mystr + if "HOSTNAME" in os.environ: + short_msg = os.environ["HOSTNAME"]+": "+short_msg + xtermTitle(short_msg) try: file_path = "/var/log/emerge.log" mylogfile = open(file_path, "a") -- 2.26.2