diff options
Diffstat (limited to 'powerlevel10k.zsh-theme')
-rw-r--r-- | powerlevel10k.zsh-theme | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/powerlevel10k.zsh-theme b/powerlevel10k.zsh-theme index 74eaba5a..ee6b38bf 100644 --- a/powerlevel10k.zsh-theme +++ b/powerlevel10k.zsh-theme @@ -44,10 +44,17 @@ _p9k_preinit fi typeset -gr __p9k_sourced=6 - if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus && ${(%):-%#} == % ]]; 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 - [[ $f.zwc -nt $f ]] || zcompile -R $f + [[ $f.zwc -nt $f ]] && continue + 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 { + (( $? )) && zf_rm -f -- $tmp + } done fi source $__p9k_root_dir/internal/p10k.zsh || true |