summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/output.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/output.py b/pym/output.py
index 2327c91aa..bd9c474e6 100644
--- a/pym/output.py
+++ b/pym/output.py
@@ -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','')