aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-23 08:53:36 +0300
committerChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-23 08:53:36 +0300
commit99e62532bb1cab11df5f86d021014930a94bed0d (patch)
treef0318f59ebdf63ecce7baf1ba4bbd3f9e7ca3061 /powerlevel9k.zsh-theme
parent3674af1cd9788b144a39358913f95979762dbb00 (diff)
Added test for root based folder to first&last
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 17909c61..051ffb8f 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -766,7 +766,8 @@ prompt_dir() {
for (( i=$POWERLEVEL9K_SHORTEN_DIR_LENGTH; i<$num; i++ )); do
paths[$i+1]=$POWERLEVEL9K_SHORTEN_DELIMITER
done
- current_path="${(j:/:)paths}"
+ [[ $current_path ~= '~'* ]] && current_path="/" || current_path=""
+ current_path+="${(j:/:)paths}"
fi
fi
;;