update shell config

This commit is contained in:
2026-07-27 02:53:24 +02:00
parent 678cfb76ba
commit 21e902bd61
24 changed files with 300 additions and 634 deletions
+13 -12
View File
@@ -42,6 +42,7 @@ fi
if type opam &>/dev/null; then
eval "$(opam env)"
fi
prepend_path "$HOME/.local/share/fnm/aliases/default/bin" # 'fnm env' is eval'ed in .bashrc
prepend_path "$HOME/.cargo/bin"
prepend_path "$HOME/go/bin"
prepend_path "$HOME/.local/bin"
@@ -54,20 +55,20 @@ if type gpgconf &>/dev/null && type gpg-connect-agent &>/dev/null &&
[ -x "$HOME/.local/scripts/gpg-init" ] &&
[ "${UY_ENABLE_GPG_AGENT_SSH:-0}" = "1" ]; then
# GPG agent for SSH
eval "$($HOME/.local/scripts/gpg-init 2>/dev/null)" &>/dev/null
eval "$("$HOME/.local/scripts/gpg-init" 2>/dev/null)" &>/dev/null
fi
if type ssh-add &>/dev/null && type ssh-agent &>/dev/null &&
{ [ -z "$SSH_AUTH_SOCK" ] ||
[ "$(
ssh-add -l &>/dev/null
echo $?
)" -eq 2 ]; } &&
[ -x "$HOME/.local/scripts/ssh-init" ]; then
unset SSH_AUTH_SOCK
# SSH with cross-session ssh-agent
eval "$($HOME/.local/scripts/ssh-init 2>/dev/null)" &>/dev/null
export UY_USING_SSH_AGENT=1
if type ssh-add &>/dev/null && type ssh-agent &>/dev/null; then
# ssh-add -l: 0 = agent with keys, 1 = agent without keys, 2 = no agent
if [ -n "$SSH_AUTH_SOCK" ] &&
{ ssh-add -l &>/dev/null; [ $? -ne 2 ]; }; then
export UY_USING_SSH_AGENT=1
elif [ -x "$HOME/.local/scripts/ssh-init" ]; then
unset SSH_AUTH_SOCK
# SSH with cross-session ssh-agent
eval "$("$HOME/.local/scripts/ssh-init" 2>/dev/null)" &>/dev/null
[ -n "$SSH_AUTH_SOCK" ] && export UY_USING_SSH_AGENT=1
fi
fi
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"