diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-05-07 00:13:56 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-05-07 00:13:56 +0300 |
commit | dc1f0233440606a9b175b5f2871a098c24af5c74 (patch) | |
tree | 9a8ec9ec47e51b5683ffdaa127f87f929aff79ff /powerlevel10k.zsh-theme | |
parent | aceb1c5c77261594f16f662942da2f06f6a6bfdf (diff) |
work around more zsh bugs w.r.t. local traps
Diffstat (limited to 'powerlevel10k.zsh-theme')
-rw-r--r-- | powerlevel10k.zsh-theme | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/powerlevel10k.zsh-theme b/powerlevel10k.zsh-theme index efe1567f..4ab56335 100644 --- a/powerlevel10k.zsh-theme +++ b/powerlevel10k.zsh-theme @@ -19,9 +19,11 @@ (( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}} (( $+__p9k_intro )) || { - # Note: leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!). + # 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 - trap "" INT + trap ":" INT trap "trap ${(q)__p9k_trapint:--} INT" EXIT local -a match mbegin mend local -i MBEGIN MEND OPTIND |