Only execute $PROMPT_COMMAND when appropriate.
authorZac Medico <zmedico@gentoo.org>
Sat, 9 Jun 2007 03:48:51 +0000 (03:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 9 Jun 2007 03:48:51 +0000 (03:48 -0000)
svn path=/main/trunk/; revision=6772

pym/portage/output.py

index cd140f016e12440c3b49a591eefc3cbff570b5f4..83ff3f1c283551077af31cdbe2e7d5ff9f007cf2 100644 (file)
@@ -194,7 +194,8 @@ def xtermTitleReset():
                if prompt_command == "":
                        default_xterm_title = ""
                elif prompt_command is not None:
-                       os.system(prompt_command)
+                       if dotitles and "TERM" in os.environ and sys.stderr.isatty():
+                               os.system(prompt_command)
                        return
                else:
                        pwd = os.getenv('PWD','')