Removed PROMPT_TOOLKIT_STYLES environment var

This commit is contained in:
Morten Enemark Lund 2016-03-22 20:55:20 +01:00
parent bd2e9e9dd4
commit 797592a6c9
2 changed files with 2 additions and 8 deletions

View file

@ -181,7 +181,6 @@ DEFAULT_VALUES = {
'PATH': (),
'PATHEXT': (),
'PROMPT': DEFAULT_PROMPT,
'PROMPT_TOOLKIT_STYLES': None,
'PUSHD_MINUS': False,
'PUSHD_SILENT': False,
'RAISE_SUBPROC_ERROR': False,
@ -334,10 +333,6 @@ DEFAULT_DOCS = {
"auto-formatted, see 'Customizing the Prompt' at "
'http://xon.sh/tutorial.html#customizing-the-prompt.',
default='xonsh.environ.DEFAULT_PROMPT'),
'PROMPT_TOOLKIT_STYLES': VarDocs(
'This is a mapping of pygments tokens to user-specified styles for '
'prompt-toolkit. This can be used to override modify the color '
'in the XONSH_COLOR_STYLE. If None, this is skipped.'),
'PUSHD_MINUS': VarDocs(
'Flag for directory pushing functionality. False is the normal '
'behavior.'),

View file

@ -282,7 +282,7 @@ class XonshStyle(Style):
style_name : str, optional
The style name to initialize with.
"""
self.trap = builtins.__xonsh_env__.get('PROMPT_TOOLKIT_STYLES') or {}
self.trap = {}
self._style_name = ''
self.style_name = style_name
super().__init__()
@ -325,7 +325,7 @@ class XonshStyle(Style):
# Ensure we are not using ConEmu
if 'CONEMUANSI' not in env:
self.styles.update({Token.AutoSuggestion:'#444444'})
if self._style_name == 'default' and env.get('PROMPT_TOOLKIT_STYLES') is None:
if self._style_name == 'default':
s = {Token.Name.Variable:'#44ffff',
Token.Generic.Prompt:'#44ffff',
Token.Name.Namespace:'#00aaaa',
@ -337,7 +337,6 @@ class XonshStyle(Style):
Token.Name.Constant:'#ff4444',
Token.Keyword.Type:'#ff4444',
Token.Generic.Error:'#ff4444'}
env['PROMPT_TOOLKIT_STYLES'] = s
self.styles.update(s)