From f7841eb43cab4afbb9c0459dcc83a837822c23c5 Mon Sep 17 00:00:00 2001 From: Chris Bargren Date: Mon, 19 Apr 2021 13:38:28 -0700 Subject: [PATCH] fix(zsh): store exit code first in precmd hook Addresses an issue causing exit code segments to incorrectly report an exit code of `0` --- src/init/omp.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init/omp.zsh b/src/init/omp.zsh index c78fdd791f75..339bcb660cf6 100644 --- a/src/init/omp.zsh +++ b/src/init/omp.zsh @@ -5,8 +5,8 @@ function omp_preexec() { } function omp_precmd() { - omp_stack_count=${#dirstack[@]} omp_last_error=$? + omp_stack_count=${#dirstack[@]} omp_elapsed=-1 if [ $omp_start_time ]; then omp_now=$(::OMP:: --millis)