mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-23 00:01:35 +08:00
The try command detects shell type from $SHELL variable. When bash is launched from fish, $SHELL is still set to /usr/bin/fish, causing try to output fish syntax which fails in bash with syntax errors. Explicitly set SHELL=/bin/bash for the try init call to ensure correct shell detection.
28 lines
791 B
Plaintext
28 lines
791 B
Plaintext
if command -v mise &> /dev/null; then
|
|
eval "$(mise activate bash)"
|
|
fi
|
|
|
|
if command -v starship &> /dev/null; then
|
|
# clear stale readline state before rendering prompt (prevents artifacts in prompt after abnormal exits like SIGQUIT)
|
|
__sanitize_prompt() { printf '\r\033[K'; }
|
|
PROMPT_COMMAND="__sanitize_prompt${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
|
|
eval "$(starship init bash)"
|
|
fi
|
|
|
|
if command -v zoxide &> /dev/null; then
|
|
eval "$(zoxide init bash)"
|
|
fi
|
|
|
|
if command -v try &> /dev/null; then
|
|
eval "$(SHELL=/bin/bash try init ~/Work/tries)"
|
|
fi
|
|
|
|
if command -v fzf &> /dev/null; then
|
|
if [[ -f /usr/share/fzf/completion.bash ]]; then
|
|
source /usr/share/fzf/completion.bash
|
|
fi
|
|
if [[ -f /usr/share/fzf/key-bindings.bash ]]; then
|
|
source /usr/share/fzf/key-bindings.bash
|
|
fi
|
|
fi
|