don't compile sources if zsh is < 5.1

pull/644/head
romkatv 5 years ago
parent c71606cd83
commit b2667b8270

@ -1,4 +1,4 @@
if [[ $__p9k_sourced != 7 ]]; then
if [[ $__p9k_sourced != 8 ]]; then
>&2 print -P ""
>&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation."
>&2 print -P ""

@ -54,7 +54,8 @@ function _p9k_init_locale() {
if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
_p9k_preinit
fi
typeset -gr __p9k_sourced=7
typeset -gr __p9k_sourced=8
if [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]; then
if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then
local f
for f in $__p9k_root_dir/{powerlevel9k.zsh-theme,powerlevel10k.zsh-theme,internal/p10k.zsh,internal/icons.zsh,internal/configure.zsh,internal/worker.zsh,internal/parser.zsh,gitstatus/gitstatus.plugin.zsh}; do
@ -68,6 +69,7 @@ function _p9k_init_locale() {
}
done
fi
fi
source $__p9k_root_dir/internal/p10k.zsh || true
}

Loading…
Cancel
Save