Open hlerebours opened 5 years ago
Remove the first (always leading) substring matching the home path instead of removing all occurrences of it from the absolute path.
Examples of issues being solved by this PR:
/home/user/hack/university
~/niversity
~/h/univerity
truncate_to_unique
/home/user/dir0/dir1~/dir2
~/../dir1dir2
~/../../dir2
truncate_to_first_and_last
Remove the first (always leading) substring matching the home path instead of removing all occurrences of it from the absolute path.
Examples of issues being solved by this PR:
/home/user/hack/university
is currently shortened as~/niversity
instead of~/h/univerity
with the strategytruncate_to_unique
/home/user/dir0/dir1~/dir2
is currently shortened as~/../dir1dir2
instead of~/../../dir2
with the strategytruncate_to_first_and_last