mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-21 20:00:07 +00:00
don't compile sources if zsh is < 5.1
This commit is contained in:
parent
c71606cd83
commit
b2667b8270
2 changed files with 16 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
if [[ $__p9k_sourced != 7 ]]; then
|
if [[ $__p9k_sourced != 8 ]]; then
|
||||||
>&2 print -P ""
|
>&2 print -P ""
|
||||||
>&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation."
|
>&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation."
|
||||||
>&2 print -P ""
|
>&2 print -P ""
|
||||||
|
|
|
@ -54,19 +54,21 @@ 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
|
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
|
_p9k_preinit
|
||||||
fi
|
fi
|
||||||
typeset -gr __p9k_sourced=7
|
typeset -gr __p9k_sourced=8
|
||||||
if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then
|
if [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]; then
|
||||||
local f
|
if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus ]]; then
|
||||||
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
|
local f
|
||||||
[[ $f.zwc -nt $f ]] && continue
|
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
|
||||||
zmodload -F zsh/files b:zf_mv b:zf_rm
|
[[ $f.zwc -nt $f ]] && continue
|
||||||
local tmp=$f.tmp.$$.zwc
|
zmodload -F zsh/files b:zf_mv b:zf_rm
|
||||||
{
|
local tmp=$f.tmp.$$.zwc
|
||||||
zcompile -R -- $tmp $f && zf_mv -f -- $tmp $f.zwc
|
{
|
||||||
} always {
|
zcompile -R -- $tmp $f && zf_mv -f -- $tmp $f.zwc
|
||||||
(( $? )) && zf_rm -f -- $tmp
|
} always {
|
||||||
}
|
(( $? )) && zf_rm -f -- $tmp
|
||||||
done
|
}
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
source $__p9k_root_dir/internal/p10k.zsh || true
|
source $__p9k_root_dir/internal/p10k.zsh || true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue