Skip to content

Commit

Permalink
feat: Terminate $PROMPT_COMMAND properly (starship#799)
Browse files Browse the repository at this point in the history
Add trailing semicolon to end $PROMPT_COMMAND properly.
This will prevent starship_precmd to accidentally mess with other hooks invoked after it.
  • Loading branch information
InNoobWeTrust authored and matchai committed Jan 4, 2020
1 parent f5a5137 commit 2eeaa05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/init/starship.bash
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ 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

# Set up the start time and STARSHIP_SHELL, which controls shell-specific sequences
STARSHIP_START_TIME=$(::STARSHIP:: time)
export STARSHIP_SHELL="bash"
export STARSHIP_SHELL="bash"

0 comments on commit 2eeaa05

Please sign in to comment.