From 14f7cd461cba30757a3c6e549dc7a47439fcf3ad Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Mon, 3 Aug 2020 13:05:31 -0700 Subject: [PATCH] fix(bash): init breaks if PROMPT_COMMAND includes starship_precmd as an intermediate command (#1541) --- src/init/starship.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init/starship.bash b/src/init/starship.bash index 663647e2..822a3b0b 100644 --- a/src/init/starship.bash +++ b/src/init/starship.bash @@ -71,7 +71,7 @@ else # add multiple instances of the starship function and keep other user functions if any. if [[ -z "$PROMPT_COMMAND" ]]; then PROMPT_COMMAND="starship_precmd" - elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then + elif [[ "$PROMPT_COMMAND" != *"starship_precmd"* ]]; then # Appending to PROMPT_COMMAND breaks exit status ($?) checking. # Prepending to PROMPT_COMMAND breaks "command duration" module. # So, we are preserving the existing PROMPT_COMMAND