mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-27 03:42:39 +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
|
if [[ -z "$PROMPT_COMMAND" ]]; then
|
||||||
PROMPT_COMMAND="starship_precmd"
|
PROMPT_COMMAND="starship_precmd"
|
||||||
elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user