diff --git a/functions/_tide_item_pwd.fish b/functions/_tide_item_pwd.fish index 37fc1f5..690bea5 100644 --- a/functions/_tide_item_pwd.fish +++ b/functions/_tide_item_pwd.fish @@ -24,8 +24,8 @@ function _tide_item_pwd set splitPwdForOutput[$i] $colorAnchors$splitPwd[$i]$keepBackgroundColor$colorDirs else if test (string join -- '/' $splitPwdForLength | string length) -gt $pwdMaxLength while set -l truncationLength (math $truncationLength + 1) && - test $truncationLength != (string length -- $splitPwdForLength[$i]) && set -l truncated (string sub --length $truncationLength -- $splitPwd[$i]) && + test $truncated != $splitPwd[$i] && test (count $parentDir/$truncated*/) -gt 1 end