Use midline ellipsis for dir shortening

This commit is contained in:
Kim Silkebækken 2013-01-16 09:04:26 +01:00
parent bf23ae286e
commit b91009404f
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def cwd(dir_shorten_len=None, dir_limit_depth=None):
cwd_split_len = len(cwd_split)
if cwd_split_len > dir_limit_depth + 1:
del(cwd_split[0:-dir_limit_depth])
cwd_split.insert(0, u'')
cwd_split.insert(0, u'')
cwd = [i[0:dir_shorten_len] if dir_shorten_len and i else i for i in cwd_split[:-1]] + [cwd_split[-1]]
cwd = os.path.join(*cwd)
return cwd