mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-21 20:00:07 +00:00
work around more zsh bugs w.r.t. local traps
This commit is contained in:
parent
aceb1c5c77
commit
dc1f023344
2 changed files with 5 additions and 3 deletions
|
@ -6428,7 +6428,7 @@ _p9k_precmd() {
|
|||
__p9k_new_status=$?
|
||||
__p9k_new_pipestatus=($pipestatus)
|
||||
|
||||
trap "" INT
|
||||
trap ":" INT
|
||||
|
||||
[[ -o ksh_arrays ]] && __p9k_ksh_arrays=1 || __p9k_ksh_arrays=0
|
||||
[[ -o sh_glob ]] && __p9k_sh_glob=1 || __p9k_sh_glob=0
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue