summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc16
1 files changed, 9 insertions, 7 deletions
diff --git a/bashrc b/bashrc
index 6bdf56a..9363dae 100644
--- a/bashrc
+++ b/bashrc
@@ -193,14 +193,16 @@ if [ -n "$PS1" ]; then
bind -r ''
fi
-export PROMPT_COMMAND=prompt_set_window_title
-
-if command -v zoxide > /dev/null; then
- eval "$(zoxide init bash)"
-fi
+gotcmd() {
+ command -v "$1" > /dev/null
+}
-if command -v starship > /dev/null; then
- eval "$(starship init bash)"
+if gotcmd zoxide && gotcmd starship; then
+ export PROMPT_COMMAND=prompt_set_window_title
+ eval "$(zoxide init bash)"
+ eval "$(starship init bash)"
+else
+ export PROMPT_COMMAND=prompt_command
fi
if [ -e "$HOME/.cargo/env" ]