aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-19 15:05:58 +0300
committerChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-19 15:05:58 +0300
commit58342612eb8ac178e53779224eb6fd00bb7a4649 (patch)
tree946e8f5a74655f0a21724295af30c4acecc0f62e /powerlevel9k.zsh-theme
parentfb09d753915ff193f4896db0b74a1b67aef2cfa4 (diff)
Improved truncation code
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index fcd1ab98..36a641d8 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -861,8 +861,8 @@ prompt_dir() {
trunc_path+="$test_dir/"
cur_path+="$directory/"
done
- [[ $current_path == "~"* ]] && current_path="~/" || current_path=""
- current_path+="${trunc_path: : -1}"
+ [[ $current_path == "~"* ]] && trunc_path="~/$trunc_path"
+ current_path="${trunc_path: : -1}"
fi
;;
*)