Update .zshrc

This commit is contained in:
Thomas Brasdefer 2024-12-19 17:05:16 +01:00
parent 436e670ca1
commit 3c328e0dd6
Signed by: tombdf
GPG Key ID: A047E76CC4582988

View File

@ -140,10 +140,10 @@ if ! pgrep -u "$USER" ssh-agent > /dev/null; then
fi fi
export SSH_AUTH_SOCK=$(ssh-agent -s | grep -oP '(?<=SSH_AUTH_SOCK=)[^;]+') export SSH_AUTH_SOCK=$(ssh-agent -s | grep -oP '(?<=SSH_AUTH_SOCK=)[^;]+')
# Add the keys to the agent # Add the keys to the agent
if [ -f ~/.ssh/id_ed25519 ]; && ! ssh-add -l | grep -q id_ed25519; then if [ -f ~/.ssh/id_ed25519 ] && ! ssh-add -l | grep -q id_ed25519; then
ssh-add ~/.ssh/id_ed25519 > /dev/null 2>&1 ssh-add ~/.ssh/id_ed25519 > /dev/null 2>&1
fi fi
if [ -f ~/.ssh/hexasec ]; && ! ssh-add -l | grep -q hexasec; then if [ -f ~/.ssh/hexasec ] && ! ssh-add -l | grep -q hexasec; then
ssh-add ~/.ssh/hexasec > /dev/null 2>&1 ssh-add ~/.ssh/hexasec > /dev/null 2>&1
fi fi