aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-03-02 11:49:46 +0300
committerGitHub <noreply@github.com>2019-03-02 11:49:46 +0300
commit758bc175d62a80d944d05277bcd521b61e1459e0 (patch)
tree4748e7fb859f3ba7343460d4fff170dafbbdffcc /powerlevel9k.zsh-theme
parent613b798bb352086b62c00e2494fc0bbefad8e8b4 (diff)
parent3057e8fc07374e9c580790a023cb85998ca91fc8 (diff)
Merge pull request #1175 from dritter/port_wrboyce_truncation_fix
Fix home dir shortening when using package_name truncation strategy
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 2 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 427e9b00..4939cb35 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -905,6 +905,8 @@ prompt_dir() {
package_path=${$(pwd)%%/.git*}
fi
+ [[ ${(L)POWERLEVEL9K_DIR_PATH_ABSOLUTE} != "true" ]] && package_path=${package_path/$HOME/"~"}
+
# Replace the shortest possible match of the marked folder from
# the current path. Remove the amount of characters up to the
# folder marker from the left. Count only the visible characters