diff options
author | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-19 15:05:58 +0300 |
---|---|---|
committer | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-19 15:05:58 +0300 |
commit | 58342612eb8ac178e53779224eb6fd00bb7a4649 (patch) | |
tree | 946e8f5a74655f0a21724295af30c4acecc0f62e /powerlevel9k.zsh-theme | |
parent | fb09d753915ff193f4896db0b74a1b67aef2cfa4 (diff) |
Improved truncation code
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
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 ;; *) |