Prevent garbled prompt for shells within emacs

This commit is contained in:
Richard Kim 2015-11-08 12:56:15 -08:00
parent 0af49af6c4
commit a604806374

View file

@ -179,7 +179,9 @@ class BaseShell(object):
"""Sets terminal title.""" """Sets terminal title."""
env = builtins.__xonsh_env__ env = builtins.__xonsh_env__
term = env.get('TERM', None) term = env.get('TERM', None)
if term is None or term == 'linux': # Shells running in emacs sets TERM to "dumb" or "eterm-color".
# Do not set title for these to avoid garbled prompt.
if term is None or term in ['dumb', 'eterm-color', 'linux']:
return return
t = env.get('TITLE') t = env.get('TITLE')
if t is None: if t is None: