50 lines
1.1 KiB
Bash
50 lines
1.1 KiB
Bash
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"
|
|
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 [ -n "$SSH_CONNECTION" ]; then
|
|
# Create a predictable symlink pointing to the current SSH auth socket
|
|
auth_sock="$HOME/.ssh/ssh_auth_sock"
|
|
if [ -n "$SSH_AUTH_SOCK" ] && [ "$SSH_AUTH_SOCK" != "$auth_sock" ]; then
|
|
mkdir -p "$HOME/.ssh" && ln -snf "$SSH_AUTH_SOCK" "$auth_sock"
|
|
fi
|
|
else
|
|
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
|
|
|