diff --git a/src/init/starship.bash b/src/init/starship.bash index e08a9fbd..5ed7a8ed 100644 --- a/src/init/starship.bash +++ b/src/init/starship.bash @@ -32,12 +32,12 @@ starship_preexec() { # Will be run before the prompt is drawn starship_precmd() { # Save the status, because commands in this pipeline will change $? - STARSHIP_CMD_STATUS=$? STARSHIP_PIPE_STATUS=(${PIPESTATUS[@]}) + STARSHIP_CMD_STATUS=$? STARSHIP_PIPE_STATUS=("${PIPESTATUS[@]}") if [[ ${BLE_ATTACHED-} && ${#BLE_PIPESTATUS[@]} -gt 0 ]]; then STARSHIP_PIPE_STATUS=("${BLE_PIPESTATUS[@]}") fi if [[ -n "${BP_PIPESTATUS-}" ]] && [[ "${#BP_PIPESTATUS[@]}" -gt 0 ]]; then - STARSHIP_PIPE_STATUS=(${BP_PIPESTATUS[@]}) + STARSHIP_PIPE_STATUS=("${BP_PIPESTATUS[@]}") fi # Due to a bug in certain Bash versions, any external process launched @@ -52,7 +52,7 @@ starship_precmd() { # Original bug: https://lists.gnu.org/archive/html/bug-bash/2022-07/msg00117.html jobs &>/dev/null - local NUM_JOBS=0 + local job NUM_JOBS=0 IFS=$' \t\n' # Evaluate the number of jobs before running the preserved 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.