mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-01-27 09:08:27 +00:00
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:
parent
f5a513770b
commit
2eeaa05bfb
@ -71,10 +71,10 @@ else
|
|||||||
PROMPT_COMMAND="starship_precmd"
|
PROMPT_COMMAND="starship_precmd"
|
||||||
elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then
|
elif [[ "$PROMPT_COMMAND" != *"starship_precmd" ]]; then
|
||||||
# Remove any trailing semicolon before appending (PR #784)
|
# Remove any trailing semicolon before appending (PR #784)
|
||||||
PROMPT_COMMAND="${PROMPT_COMMAND%;};starship_precmd"
|
PROMPT_COMMAND="${PROMPT_COMMAND%;};starship_precmd;"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up the start time and STARSHIP_SHELL, which controls shell-specific sequences
|
# Set up the start time and STARSHIP_SHELL, which controls shell-specific sequences
|
||||||
STARSHIP_START_TIME=$(::STARSHIP:: time)
|
STARSHIP_START_TIME=$(::STARSHIP:: time)
|
||||||
export STARSHIP_SHELL="bash"
|
export STARSHIP_SHELL="bash"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user