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.
This commit is contained in:
InNoobWeTrust 2020-01-04 22:52:08 +07:00 committed by Matan Kushner
parent f5a513770b
commit 2eeaa05bfb
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ 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