Files
omarchy/default/bash/init
T
David Heinemeier HanssonandClaude Opus 5.5 e332dc975d Get the bash prompt up ~30ms sooner (#13591)
fzf's completion.bash rewraps the completions of ~76 commands on every
interactive shell start, costing ~25ms once bash-completion is loaded. Keep
only the key bindings (Ctrl-R, Ctrl-T, Alt-C); **<Tab> fuzzy completion goes.

`starship init bash` only prints a line that runs starship again with
--print-full-init, so call that directly and start the binary once.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 21:07:30 +02:00

30 lines
786 B
Plaintext

if command -v mise &> /dev/null; then
eval "$(mise activate bash)"
fi
if [[ $- == *i* ]] && [[ ${TERM:-} != "dumb" ]] && command -v starship &> /dev/null; then
eval "$(starship init bash --print-full-init)"
fi
if command -v zoxide &> /dev/null; then
eval "$(zoxide init bash)"
fi
if command -v try &> /dev/null; then
try() {
unset -f try
eval "$(SHELL=/bin/bash command try init ~/Work/tries)"
try "$@"
}
fi
# Only the key bindings (Ctrl-R, Ctrl-T, Alt-C): fzf's completion.bash rewraps
# ~76 commands' completions on every shell start, adding ~25ms before the prompt.
if command -v fzf &> /dev/null; then
if [[ -f /usr/share/fzf/key-bindings.bash ]]; then
source /usr/share/fzf/key-bindings.bash
fi
fi
source "$OMARCHY_PATH/default/bash/completions"