append_path () {
      case ":$PATH:" in
          *:"$1":*)
              ;;
          *)
              PATH="${PATH:+$PATH:}$1"
      esac
}

append_path "$HOME/.local/bin"
append_path "$HOME/.cargo/bin"

export PATH
if [ -x $(command -v bat) ]; then
    export PAGER="bat -p"
fi 

if [ -x $(command -v mise) ]; then 
    eval "$(mise activate bash)"
fi

if [ -x $(command -v zoxide) ]; then 
    eval "$(zoxide init bash)"
fi

if [ -x $(command -v fzf) ]; then 
    eval "$(fzf --bash)"
fi

if [ -x $(command -v wt) ]; then 
    eval "$(command wt config shell init bash)"; 
fi

if [ -z "$SSH_CONNECTION" ]; then
    export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi

for _f in "$HOME"/.config/herdr/plugins/github/herdr-automatic-rename-*/shell/hook.bash; do
  [ -r "$_f" ] && { source "$_f"; break; }
done

[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases

