From 92985818b56b916ba36d32f968c87cfb48495c2a Mon Sep 17 00:00:00 2001 From: adam j hartz Date: Sun, 6 Dec 2015 13:55:02 -0500 Subject: [PATCH] modify _collapsed_pwd to use tools.get_sep --- xonsh/environ.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xonsh/environ.py b/xonsh/environ.py index effb3ecf9..c67f18765 100644 --- a/xonsh/environ.py +++ b/xonsh/environ.py @@ -19,7 +19,7 @@ from xonsh.tools import ( env_path_to_str, is_bool, to_bool, bool_to_str, is_history_tuple, to_history_tuple, history_tuple_to_str, is_float, string_types, is_string, DEFAULT_ENCODING, is_completions_display_value, to_completions_display_value, is_string_set, - csv_to_set, set_to_csv + csv_to_set, set_to_csv, get_sep ) from xonsh.dirstack import _get_cwd from xonsh.foreign_shells import DEFAULT_SHELLS, load_foreign_envs @@ -98,7 +98,7 @@ 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 @@ -554,9 +554,7 @@ def _replace_home(x): _replace_home_cwd = lambda: _replace_home(builtins.__xonsh_env__['PWD']) def _collapsed_pwd(): - sep = os.sep - if ON_WINDOWS and builtins.__xonsh_env__.get('FORCE_POSIX_PATHS'): - sep = os.altsep + sep = get_sep() pwd = _replace_home_cwd().split(sep) l = len(pwd) leader = sep if l>0 and len(pwd[0])==0 else ''