diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-10-25 09:17:29 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-10-25 09:17:29 +0300 |
commit | dc731f10e6314922c08b3cfe9f060559ed87b921 (patch) | |
tree | 48252053776552f4f8fe1982090fa33946876aa1 /powerlevel9k.zsh-theme | |
parent | ad14807cef372994c3ba00632117f6d43b798ffb (diff) |
Make truncate with package name work without setting shorten length
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 3c3303fa..c8a98474 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -803,7 +803,7 @@ prompt_dir() { # if we are not in "~" or "/", split the paths into an array and exclude "~" (( ${#current_path} > 1 )) && paths=(${(s:/:)${current_path//"~\/"/}}) || paths=() # only run the code if SHORTEN_DIR_LENGTH is set, or we are using the two strategies that don't rely on it. - if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_to_last" ]]; then + if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_to_last" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_package_name" ]]; then set_default POWERLEVEL9K_SHORTEN_DELIMITER "\u2026" # convert delimiter from unicode to literal character, so that we can get the correct length later local delim=$(echo -n $POWERLEVEL9K_SHORTEN_DELIMITER) |