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
|
# Will be run before the prompt is drawn
|
||||||
starship_precmd() {
|
starship_precmd() {
|
||||||
local NUM_JOBS
|
|
||||||
# Save the status, because commands in this pipeline will change $?
|
# Save the status, because commands in this pipeline will change $?
|
||||||
STARSHIP_CMD_STATUS=$?
|
STARSHIP_CMD_STATUS=$?
|
||||||
|
|
||||||
|
local NUM_JOBS
|
||||||
# Evaluate the number of jobs before running the preseved prompt command, so that tools
|
# 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
|
# 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
|
# to be displayed by starship. Also avoids forking to run `wc`, slightly improving perf
|
||||||
|
|
Loading…
Reference in New Issue