diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-11-03 16:29:11 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-11-03 16:29:11 +0300 |
commit | 561f3734a9918f32c79de9154c14762734d4e302 (patch) | |
tree | 7c6381b246af9b69eb71bc8af1e46488a40fcaea /internal/p10k.zsh | |
parent | 1d0ee7cbdde5dcaed7e773c0817e18c899a2f80e (diff) |
trap sigint
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 6f85a40f..c8b4488f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4144,10 +4144,21 @@ _p9k_precmd() { [[ -o ksh_arrays ]] && __p9k_ksh_arrays=1 || __p9k_ksh_arrays=0 [[ -o sh_glob ]] && __p9k_sh_glob=1 || __p9k_sh_glob=0 + _p9k_precmd_impl + unsetopt localoptions setopt nopromptbang prompt_percent prompt_subst - _p9k_precmd_impl + if (( ! $+functions[TRAPINT] )); then + function TRAPINT() { + if (( __p9k_enabled )); then + emulate -L zsh + setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst} + _p9k_zle_line_finish + fi + return 130 + } + fi } function _p9k_reset_prompt() { @@ -5404,9 +5415,7 @@ _p9k_init() { fi fi - if (( _p9k_reset_on_line_finish )) || _p9k_segment_in_use status ; then - _p9k_wrap_zle_widget zle-line-finish _p9k_zle_line_finish - fi + _p9k_wrap_zle_widget zle-line-finish _p9k_zle_line_finish if _p9k_segment_in_use vi_mode || _p9k_segment_in_use prompt_char; then _p9k_wrap_zle_widget zle-keymap-select _p9k_zle_keymap_select |