From e332dc975d5f635294c497ebb54feb98dc3d89eb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 28 Sep 2026 21:07:30 +0200 Subject: [PATCH] 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); ** 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 --- default/bash/init | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/default/bash/init b/default/bash/init index c3d8c97a..d172f845 100644 --- a/default/bash/init +++ b/default/bash/init @@ -3,7 +3,7 @@ if command -v mise &> /dev/null; then fi if [[ $- == *i* ]] && [[ ${TERM:-} != "dumb" ]] && command -v starship &> /dev/null; then - eval "$(starship init bash)" + eval "$(starship init bash --print-full-init)" fi if command -v zoxide &> /dev/null; then @@ -18,10 +18,9 @@ if command -v try &> /dev/null; then } 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/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