diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 4366628d..3d499c73 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -77,8 +77,9 @@ _p9k_cache_get() { # Sets _P9K_RETVAL to the icon whose name is supplied via $1. _p9k_get_icon() { - local var_name=POWERLEVEL9K_$1 - _P9K_RETVAL=${(g::)${${(P)var_name}-$icons[$1]}} + local x=POWERLEVEL9K_$1 + (( $+parameters[$x] )) && x=${(P)x} || x=$icons[$1] + _P9K_RETVAL=${(g::)x} [[ $_P9K_RETVAL != $'\b'? ]] || _P9K_RETVAL="%{$_P9K_RETVAL%}" # penance for past sins }