From 1bc52c3c48cb2543388f31b4106e0c6ec02b7211 Mon Sep 17 00:00:00 2001 From: Laurent Nullens Date: Thu, 31 Dec 2020 11:31:12 +0100 Subject: [PATCH] fix: exit code always equal 0 The exit code was not captured correctly since the move to the new bootstrap system. It never displays the actual exit code. --- src/init/omp.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init/omp.zsh b/src/init/omp.zsh index 033029d9..e30b9fe3 100644 --- a/src/init/omp.zsh +++ b/src/init/omp.zsh @@ -5,15 +5,17 @@ function omp_preexec() { } function omp_precmd() { + omp_last_error=$? omp_elapsed=-1 if [ $omp_start_time ]; then omp_now=$(::OMP:: --millis) omp_elapsed=$(($omp_now-$omp_start_time)) fi - eval "$(::OMP:: --config $POSH_THEME --error $? --execution-time $omp_elapsed --eval)" + eval "$(::OMP:: --config $POSH_THEME --error $omp_last_error --execution-time $omp_elapsed --eval)" unset omp_start_time unset omp_now unset omp_elapsed + unset omp_last_error } function install_omp_hooks() {