diff options
Diffstat (limited to 'functions/utilities.zsh')
-rw-r--r-- | functions/utilities.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 86e5ba0e..b4bfb838 100644 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -85,6 +85,10 @@ case $(uname) in OS='OSX' OS_ICON=$(print_icon 'APPLE_ICON') ;; + CYGWIN_NT-*) + OS='Windows' + OS_ICON=$(print_icon 'WINDOWS_ICON') + ;; FreeBSD) OS='BSD' OS_ICON=$(print_icon 'FREEBSD_ICON') @@ -212,7 +216,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" } |