diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2017-07-17 21:42:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 21:42:29 +0300 |
commit | 45fc45223cabaecb068d33c681e90462625fe51c (patch) | |
tree | f1b8c1f7bf42f31aeda0aac7f1cbd26c925a8004 /functions/utilities.zsh | |
parent | 82f319d1fbe25fe450d0851a5556545a11d9502d (diff) | |
parent | a234636982349a82ab6c7f0674f3ff884acddc94 (diff) |
Merge pull request #568 from dritter/fix_empty_delimiter
Fix empty delimiter
Diffstat (limited to 'functions/utilities.zsh')
-rw-r--r-- | functions/utilities.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 86e5ba0e..39c5ecae 100644 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -212,7 +212,7 @@ function segmentShouldBeJoined() { # Given a directory path, truncate it according to the settings for # `truncate_from_right` function truncatePathFromRight() { - local delim_len=${#POWERLEVEL9K_SHORTEN_DELIMITER} + local delim_len=${#POWERLEVEL9K_SHORTEN_DELIMITER:-1} echo $1 | sed $SED_EXTENDED_REGEX_PARAMETER \ "s@(([^/]{$((POWERLEVEL9K_SHORTEN_DIR_LENGTH))})([^/]{$delim_len}))[^/]+/@\2$POWERLEVEL9K_SHORTEN_DELIMITER/@g" } |