mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
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:
parent
85312dcef4
commit
d68600a9d8
1 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue