feature: add max length feature to cwd #326
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in reference to #324 this pr attempts to implement the suggestion.
tested on macos
not yet documented.
use
set -g @dracula-cwd-length "0"to set the max length, where 0 is unrestricted.whenever the paths length is cut, it is displayed without / or ~/ to the left of it to prevent confusion.
example:
max length is 1:
/ becomes / as usual
/Users becomes /Users as usual
/Users/username becomes ~ as usual
/Users/username/.config becomes ~/.config as usual
/Users/username/.config/tmux becomes tmux. no / to the left indicates a cut path
max length is 3:
/Users/username/.config becomes ~/.config as usual
/Users/username/.config/tmux/plugins becomes ~/.config/tmux/plugins as usual
/Users/username/.config/tmux/plugins/tmux becomes tmux. no / to the left indicates a cut path
max length is 0:
unchanged behaviour to previously
my solution seems hacky, but i couldnt think of anything else at this time of day.
please critique or suggest a different solution.
documentation and testing on linux will follow.