aboutsummaryrefslogtreecommitdiff
path: root/powerlevel10k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel10k.zsh-theme')
-rw-r--r--powerlevel10k.zsh-theme14
1 files changed, 4 insertions, 10 deletions
diff --git a/powerlevel10k.zsh-theme b/powerlevel10k.zsh-theme
index d1fbd95e..d8a30ba0 100644
--- a/powerlevel10k.zsh-theme
+++ b/powerlevel10k.zsh-theme
@@ -54,7 +54,7 @@ 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=9
+ typeset -gr __p9k_sourced=10
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
@@ -63,16 +63,10 @@ function _p9k_init_locale() {
zmodload -F zsh/files b:zf_mv b:zf_rm
local tmp=$f.tmp.$$.zwc
{
- # The first error suppression is a workaround for the bug in
- # https://aur.archlinux.org/packages/zsh-theme-powerlevel10k-git/.
- # This package misses some source files.
- #
- # The second error suppression is due to
- # https://github.com/romkatv/powerlevel10k/issues/610.
- # I've no idea what actually happens there.
- zcompile -R -- $tmp $f 2>/dev/null && zf_mv -f -- $tmp $f.zwc 2>/dev/null
+ # `zf_mv -f src dst` fails on NTFS if `dst` is not writable, hence `zf_rm`.
+ zf_rm -f -- $f.zwc && zcompile -R -- $tmp $f && zf_mv -f -- $tmp $f.zwc
} always {
- (( $? )) && zf_rm -f -- $tmp 2>/dev/null
+ (( $? )) && zf_rm -f -- $tmp
}
done
fi