Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

[Bugfix] Fix substring replacements used for trimming #1376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hlerebours
Copy link

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 strategy truncate_to_unique
  • /home/user/dir0/dir1~/dir2 is currently shortened as ~/../dir1dir2 instead of ~/../../dir2 with the strategy 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant