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
  # Fedora ships the bindings under /usr/share/fzf/shell.
  if [[ -f /usr/share/fzf/shell/key-bindings.bash ]]; then
    source /usr/share/fzf/shell/key-bindings.bash
  fi
fi

source "$OMARCHY_PATH/default/bash/completions"
