summaryrefslogtreecommitdiffstats
path: root/src/init
diff options
context:
space:
mode:
authorInNoobWeTrust <vu.truong.16193@gmail.com>2020-01-04 22:52:08 +0700
committerMatan Kushner <hello@matchai.me>2020-01-04 10:52:08 -0500
commit2eeaa05bfbf88bd734ab8c6d07438b4f6cf88aff (patch)
tree84af6e6869b59b6696c01c76a0fea52ec85f7746 /src/init
parentf5a513770b2329c5b74ed16b62e4ee84e25119bd (diff)
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.
Diffstat (limited to 'src/init')
-rw-r--r--src/init/starship.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init/starship.bash b/src/init/starship.bash
index ccc54ac15..f1ce551e3 100644
--- a/src/init/starship.bash
+++ b/src/init/starship.bash
@@ -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" \ No newline at end of file
+export STARSHIP_SHELL="bash"