aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBenoit Averty <benoit.averty@gmail.com>2016-08-10 14:00:52 +0300
committerDominik Ritter <dritter03@googlemail.com>2017-02-01 01:49:13 +0300
commit5cc2d51b5829d0ae2eefaa115892da71f6a14d79 (patch)
tree33b8aba3a899c6833f6dd80b37292ea251bda903 /powerlevel9k.zsh-theme
parentebf808c533ed86ede4b5afcf9206c05b832278db (diff)
Fix bug when truncate root was set to direct subfolder of home or root
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c679ba56..afc4a6bc 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -615,7 +615,7 @@ prompt_dir() {
dir_truncate_root=$(upsearch $POWERLEVEL9K_ROOT_MARKER_FILE)
zero='%([BSUbfksu]|([FB]|){*})'
- if [[ "$dir_truncate_root" == "/" || "$dir_truncate_root" == "$HOME" ]]; then
+ if [[ "$dir_truncate_root" == "/" || "$dir_truncate_root" == "$HOME" || "${dir_truncate_root%/*}" == "$HOME" || ${dir_truncate_root%/*} == "/" ]]; then
current_path='%~'
elif [[ "$dir_truncate_root" == "$HOME"* ]]; then
current_path="~/$POWERLEVEL9K_SHORTEN_DELIMITER/${dir_truncate_root##*/}${PWD:${#${(S%%)dir_truncate_root//$~zero/}}}"