mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-05 04:47:58 +00:00
fix(bash): Fix broken bash init script (#2100)
This fixes a regression where the exit code of the most recently run command was not correctly recorded in the bash init script.
This commit is contained in:
parent
452694903c
commit
8cd4850ab6
@ -28,10 +28,10 @@ starship_preexec() {
|
||||
|
||||
# Will be run before the prompt is drawn
|
||||
starship_precmd() {
|
||||
local NUM_JOBS
|
||||
# Save the status, because commands in this pipeline will change $?
|
||||
STARSHIP_CMD_STATUS=$?
|
||||
|
||||
local NUM_JOBS
|
||||
# Evaluate the number of jobs before running the preseved prompt command, so that tools
|
||||
# like z/autojump, which background certain jobs, do not cause spurious background jobs
|
||||
# to be displayed by starship. Also avoids forking to run `wc`, slightly improving perf
|
||||
|
Loading…
Reference in New Issue
Block a user