This commit is contained in:
Patrick Fasano 2023-10-26 00:54:18 -04:00 committed by GitHub
commit f15d64489a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,9 +6,10 @@ ELLIPSIS = u'\u2026'
def replace_home_dir(cwd):
realcwd = os.path.realpath(cwd)
home = os.path.realpath(os.getenv('HOME'))
if cwd.startswith(home):
return '~' + cwd[len(home):]
if realcwd.startswith(home):
return '~' + realcwd[len(home):]
return cwd