mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 06:46:33 +02:00
Home may be None, respect it
This commit is contained in:
parent
173159aea4
commit
4e35007486
@ -101,8 +101,9 @@ def cwd(pl, segment_info, dir_shorten_len=None, dir_limit_depth=None, use_path_s
|
|||||||
cwd = "[not found]"
|
cwd = "[not found]"
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
home = u(segment_info['home'])
|
home = segment_info['home']
|
||||||
if home:
|
if home:
|
||||||
|
home = u(home)
|
||||||
cwd = re.sub('^' + re.escape(home), '~', cwd, 1)
|
cwd = re.sub('^' + re.escape(home), '~', cwd, 1)
|
||||||
cwd_split = cwd.split(os.sep)
|
cwd_split = cwd.split(os.sep)
|
||||||
cwd_split_len = len(cwd_split)
|
cwd_split_len = len(cwd_split)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user