summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas O'Donnell <andytom@users.noreply.github.com>2021-01-07 18:35:32 +0100
committerGitHub <noreply@github.com>2021-01-07 18:35:32 +0100
commit8cd4850ab6c293f72af7b35416ba2bc638fed1f4 (patch)
tree6e968179503331bbf89be5f14e7c94b5d1f8380e
parent452694903c9682b597bee5fde728a4a82795a355 (diff)
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.
-rw-r--r--src/init/starship.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init/starship.bash b/src/init/starship.bash
index 09dbb7b18..055335270 100644
--- a/src/init/starship.bash
+++ b/src/init/starship.bash
@@ -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