From 2eeaa05bfbf88bd734ab8c6d07438b4f6cf88aff Mon Sep 17 00:00:00 2001 From: InNoobWeTrust Date: Sat, 4 Jan 2020 22:52:08 +0700 Subject: [PATCH] feat: Terminate $PROMPT_COMMAND properly (#799) Add trailing semicolon to end $PROMPT_COMMAND properly. This will prevent starship_precmd to accidentally mess with other hooks invoked after it. --- src/init/starship.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init/starship.bash b/src/init/starship.bash index ccc54ac1..f1ce551e 100644 --- a/src/init/starship.bash +++ b/src/init/starship.bash @@ -71,10 +71,10 @@ else PROMPT_COMMAND="starship_precmd" elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then # Remove any trailing semicolon before appending (PR #784) - PROMPT_COMMAND="${PROMPT_COMMAND%;};starship_precmd" + PROMPT_COMMAND="${PROMPT_COMMAND%;};starship_precmd;" fi fi # Set up the start time and STARSHIP_SHELL, which controls shell-specific sequences STARSHIP_START_TIME=$(::STARSHIP:: time) -export STARSHIP_SHELL="bash" \ No newline at end of file +export STARSHIP_SHELL="bash"