Change the default prompt for winodows. On windows the blue color does not work well in cmd.exe, so we use CYAN instead.

This commit is contained in:
Morten Enemark Lund 2015-12-01 13:30:13 +01:00
parent 85312dcef4
commit d68600a9d8

View file

@ -90,10 +90,15 @@ def default_value(f):
def is_callable_default(x):
"""Checks if a value is a callable default."""
return callable(x) and getattr(x, '_xonsh_callable_default', False)
DEFAULT_PROMPT = ('{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} '
'{cwd}{branch_color}{curr_branch} '
'{BOLD_BLUE}{prompt_end}{NO_COLOR} ')
if ON_WINDOWS:
DEFAULT_PROMPT = ('{BOLD_GREEN}{user}@{hostname}{BOLD_CYAN} '
'{cwd}{branch_color}{curr_branch} '
'{BOLD_WHITE}{prompt_end}{NO_COLOR} ')
else:
DEFAULT_PROMPT = ('{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} '
'{cwd}{branch_color}{curr_branch} '
'{BOLD_BLUE}{prompt_end}{NO_COLOR} ')
DEFAULT_TITLE = '{user}@{hostname}: {cwd} | xonsh'
@default_value