use new Env interface for PROMPT_TOOLKIT_COLORS

This commit is contained in:
adam j hartz 2015-11-29 15:49:12 -05:00
parent 01783aef7e
commit b6c221fd2a
2 changed files with 2 additions and 1 deletions

View file

@ -149,6 +149,7 @@ DEFAULT_VALUES = {
'PATH': (),
'PATHEXT': (),
'PROMPT': DEFAULT_PROMPT,
'PROMPT_TOOLKIT_COLORS': {},
'PROMPT_TOOLKIT_STYLES': None,
'PUSHD_MINUS': False,
'PUSHD_SILENT': False,

View file

@ -730,7 +730,7 @@ def _make_style(color_name):
for k, v in _PT_STYLE.items():
if k in color_name:
style.append(v)
_custom_colors = builtins.__xonsh_env__.get('PROMPT_TOOLKIT_COLORS', {})
_custom_colors = builtins.__xonsh_env__.get('PROMPT_TOOLKIT_COLORS')
for k, v in _custom_colors.items():
if k in color_name:
style.append(v)