aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinternal/p10k.zsh2
-rwxr-xr-xpowerlevel9k.zsh-theme15
2 files changed, 10 insertions, 7 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 62ca8638..a4cdcc96 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3371,7 +3371,7 @@ function _p9k_dump_state() {
typeset -g __p9k_cached_param_sig=$_p9k_param_sig
typeset -p __p9k_cached_param_sig >&$fd || return
unset __p9k_cached_param_sig
- (( $+functions[_p9k_preinit] )) && functions _p9k_preinit >&$fd || return
+ (( $+functions[_p9k_preinit] )) && { functions _p9k_preinit >&$fd || return }
print -r -- '_p9k_restore_state_impl() {' >&$fd || return
typeset -pm "($include)~($exclude)" >&$fd || return
print -r -- '}' >&$fd || return
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 36307b4e..7221b8f5 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -11,12 +11,14 @@
################################################################
# Temporarily change options.
-'builtin' 'local' '-a' '_p9k_src_opts'
-[[ ! -o 'aliases' ]] || _p9k_src_opts+=('aliases')
-[[ ! -o 'sh_glob' ]] || _p9k_src_opts+=('sh_glob')
-[[ ! -o 'no_brace_expand' ]] || _p9k_src_opts+=('no_brace_expand')
+'builtin' 'local' '-a' '__p9k_src_opts'
+[[ ! -o 'aliases' ]] || __p9k_src_opts+=('aliases')
+[[ ! -o 'sh_glob' ]] || __p9k_src_opts+=('sh_glob')
+[[ ! -o 'no_brace_expand' ]] || __p9k_src_opts+=('no_brace_expand')
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
+echo saved ${__p9k_src_opts[@]}
+
typeset -g __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}
typeset -g __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
@@ -40,5 +42,6 @@ typeset -g __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
source $__p9k_root_dir/internal/p10k.zsh || true
}
-(( ${#_p9k_src_opts} )) && setopt ${_p9k_src_opts[@]}
-'builtin' 'unset' '_p9k_src_opts'
+echo setopt ${__p9k_src_opts[@]}
+(( ${#__p9k_src_opts} )) && setopt ${__p9k_src_opts[@]}
+'builtin' 'unset' '__p9k_src_opts'