make __p9k_dump_file readonly to ensure no one unsets it

pull/260/head
romkatv 5 years ago
parent 99c9a2ea25
commit 5bd389e707

@ -17,8 +17,7 @@
[[ ! -o 'no_brace_expand' ]] || __p9k_src_opts+=('no_brace_expand') [[ ! -o 'no_brace_expand' ]] || __p9k_src_opts+=('no_brace_expand')
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
typeset -g __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}} (( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}
typeset -g __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
() { () {
emulate -L zsh emulate -L zsh
@ -27,6 +26,7 @@ typeset -g __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
prompt_powerlevel9k_setup prompt_powerlevel9k_setup
return return
fi fi
typeset -gr __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
if [[ -z $__p9k_dump_file(.zwc|)(#qNW) ]] && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then if [[ -z $__p9k_dump_file(.zwc|)(#qNW) ]] && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
_p9k_preinit _p9k_preinit
fi fi

Loading…
Cancel
Save