summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorKayant <anthonysanwo@googlemail.com>2016-01-16 02:12:38 +0300
committerKayant <anthonysanwo@googlemail.com>2016-01-16 04:08:52 +0300
commitcf921fb90c8d239f57391cf6ae459c3d6b6420bf (patch)
tree57420ed26f890bd8ee15543c26dde3bfb10b9ad2 /powerlevel9k.zsh-theme
parent94419f54a575944075a979f84dbfc981eae8a08a (diff)
Add sub folder icon when in home subdirectories
Big thanks to @dritter for guidance, @rjorgenson for great explanation. And @bhilburn for further guidance and encouragement. See http://i.imgur.com/2Vncypo.png for a presentation of how it looks.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 3 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 119d31e2..c3b12759 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -429,8 +429,10 @@ prompt_dir() {
fi
local current_icon=''
- if [[ $(print -P "%~") == '~'* ]]; then
+ if [[ $(print -P "%~") == '~' ]]; then
"$1_prompt_segment" "$0_HOME" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_ICON'
+ elif [[ $(print -P "%~") == '~'* ]]; then
+ "$1_prompt_segment" "$0_HOME_SUBFOLDER" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_SUB_ICON'
else
"$1_prompt_segment" "$0_DEFAULT" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'FOLDER_ICON'
fi