mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-26 19:40:20 +00:00
fix: Remove trailing semicolon from $PROMPT_COMMAND
(#784)
Remove any trailing semicolon in $PROMPT_COMMAND before appending starship_precmd, to prevent syntax error.
This commit is contained in:
parent
36cfbfcf03
commit
9d49410102
@ -70,7 +70,8 @@ else
|
||||
if [[ -z "$PROMPT_COMMAND" ]]; then
|
||||
PROMPT_COMMAND="starship_precmd"
|
||||
elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then
|
||||
PROMPT_COMMAND="$PROMPT_COMMAND;starship_precmd"
|
||||
# Remove any trailing semicolon before appending (PR #784)
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND%;};starship_precmd"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user