diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-10-05 11:43:50 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-10-05 11:43:50 +0300 |
commit | bacb43775d61aac4cd110842f321baa4e90386cd (patch) | |
tree | 372f85700206ba7f9a08a36b0df612f1ee7fcba9 /powerlevel9k.zsh-theme | |
parent | 6d16760253c0a0a09858ccfac288ec379dc815f1 (diff) |
don't unsetopt aliases when the theme is sourced twice
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 15 |
1 files changed, 9 insertions, 6 deletions
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' |