mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-01 09:13:54 +00:00
fix(bash): init breaks if PROMPT_COMMAND includes starship_precmd as an intermediate command (#1541)
This commit is contained in:
parent
09f3b2a8dd
commit
14f7cd461c
@ -71,7 +71,7 @@ else
|
|||||||
# add multiple instances of the starship function and keep other user functions if any.
|
# add multiple instances of the starship function and keep other user functions if any.
|
||||||
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
|
||||||
# Appending to PROMPT_COMMAND breaks exit status ($?) checking.
|
# Appending to PROMPT_COMMAND breaks exit status ($?) checking.
|
||||||
# Prepending to PROMPT_COMMAND breaks "command duration" module.
|
# Prepending to PROMPT_COMMAND breaks "command duration" module.
|
||||||
# So, we are preserving the existing PROMPT_COMMAND
|
# So, we are preserving the existing PROMPT_COMMAND
|
||||||
|
Loading…
Reference in New Issue
Block a user