Compare commits

...

2 Commits

Author SHA1 Message Date
Robert Gu d4024c38ca
Merge 1be8493966 into b97926675a 2026-01-23 13:24:19 +01:00
Robert Gu 1be8493966 Show the last error code only once 2025-06-12 12:38:24 -05:00
1 changed files with 7 additions and 0 deletions

View File

@ -5819,6 +5819,7 @@ _p9k_preexec1() {
}
_p9k_preexec2() {
typeset -g _p9k__preexec_called=1 # Unset in precmd for "show error once"
typeset -g _p9k__preexec_cmd=$2
_p9k__timer_start=EPOCHREALTIME
P9K_TTY=old
@ -7138,6 +7139,11 @@ _p9k_trapint() {
_p9k_precmd() {
__p9k_new_status=$?
__p9k_new_pipestatus=($pipestatus)
if (( _POWERLEVEL9K_STATUS_ERROR_SHOW_ONCE && ! _p9k__preexec_called )); then
__p9k_new_status=0
__p9k_new_pipestatus=(0)
fi
_p9k__preexec_called=0
trap ":" INT
@ -7720,6 +7726,7 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_STATUS_ERROR 1
_p9k_declare -b POWERLEVEL9K_STATUS_ERROR_PIPE 1
_p9k_declare -b POWERLEVEL9K_STATUS_ERROR_SIGNAL 1
_p9k_declare -b POWERLEVEL9K_STATUS_ERROR_SHOW_ONCE 0
_p9k_declare -b POWERLEVEL9K_STATUS_SHOW_PIPESTATUS 1
_p9k_declare -b POWERLEVEL9K_STATUS_HIDE_SIGNAME 0
_p9k_declare -b POWERLEVEL9K_STATUS_VERBOSE_SIGNAME 1