From 5ea5d4bc196d3b3c82d611149a541061e47716d5 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 22 Dec 2020 09:16:02 +0100 Subject: [PATCH] disable re_match_pcre, otherwise we can get an error when users enable this option without having zsh/pcre module --- internal/p10k.zsh | 2 +- powerlevel10k.zsh-theme | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c6cccdbf..9aa03f94 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1,4 +1,4 @@ -if [[ $__p9k_sourced != 12 ]]; then +if [[ $__p9k_sourced != 13 ]]; then >&2 print -P "" >&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation." >&2 print -P "" diff --git a/powerlevel10k.zsh-theme b/powerlevel10k.zsh-theme index d17862af..92079d40 100644 --- a/powerlevel10k.zsh-theme +++ b/powerlevel10k.zsh-theme @@ -22,7 +22,7 @@ # Leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!). # __p9k_trapint is to work around bugs in zsh: https://www.zsh.org/mla/workers/2020/msg00612.html. # Likewise for `trap ":"` instead of the plain `trap ""`. - typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent + typeset -gr __p9k_intro_base='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent -o no_rematch_pcre (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT } local -a match mbegin mend local -i MBEGIN MEND OPTIND @@ -57,7 +57,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=12 + typeset -gr __p9k_sourced=13 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