Skip to content

Commit

Permalink
fix(zsh): store exit code first in precmd hook
Browse files Browse the repository at this point in the history
Addresses an issue causing exit code segments to incorrectly report an
exit code of `0`
  • Loading branch information
cbargren authored and JanDeDobbeleer committed Apr 20, 2021
1 parent 094b70f commit f7841eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init/omp.zsh
Expand Up @@ -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)
Expand Down

0 comments on commit f7841eb

Please sign in to comment.