summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme6
1 files changed, 4 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 3e2beff0..a79548a5 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -51,7 +51,7 @@ fi
# If this theme is sourced as a symlink, we need to locate the true URL
if [[ -L $0 ]]; then
# Script is a symlink
- filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null)"
+ filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null || perl -MCwd=abs_path -le 'print abs_path readlink(shift);' $0 2>/dev/null)"
elif [[ -f $0 ]]; then
# Script is a file
filename="$0"
@@ -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