diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2021-10-10 11:34:54 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2021-10-10 11:34:54 +0300 |
commit | edd98053cc96a8d2bd50f2b5f18a97fec0a96b26 (patch) | |
tree | a93df0f8b8500ec6471ac8764aff974f6192c873 /internal/p10k.zsh | |
parent | 5acedce0b04bca7d2e633d15fb4d8c911cb27268 (diff) |
disable icanon on the tty after printing instant prompt; this way keys like Ctrl-R and Ctrl-D will get through to zle
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index af56ef77..976f6e8b 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5933,7 +5933,7 @@ _p9k_set_instant_prompt() { [[ -n $RPROMPT ]] || unset RPROMPT } -typeset -gri __p9k_instant_prompt_version=43 +typeset -gri __p9k_instant_prompt_version=44 _p9k_dump_instant_prompt() { local user=${(%):-%n} @@ -6237,6 +6237,9 @@ _p9k_dump_instant_prompt() { typeset -g __p9k_instant_prompt_output=${TMPDIR:-/tmp}/p10k-instant-prompt-output-${(%):-%n}-$$ { echo -n > $__p9k_instant_prompt_output } || return print -rn -- "$out" || return + if (( $+commands[stty] )); then + command stty -icanon 2>/dev/null + fi local fd_null sysopen -ru fd_null /dev/null || return exec {__p9k_fd_0}<&0 {__p9k_fd_1}>&1 {__p9k_fd_2}>&2 0<&$fd_null 1>$__p9k_instant_prompt_output |