mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Prevent garbled prompt for shells within emacs
This commit is contained in:
parent
0af49af6c4
commit
a604806374
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue