Update .zshrc

This commit is contained in:
Thomas Brasdefer 2024-12-19 16:53:46 +01:00
parent f3af7a783e
commit 8add60292e
Signed by: tombdf
GPG Key ID: A047E76CC4582988

View File

@ -134,6 +134,20 @@ else
export EDITOR='vim' export EDITOR='vim'
fi fi
# Set the ssh-agent if it is not already running
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
# Démarre ssh-agent
eval "$(ssh-agent -s)" > /dev/null
fi
export SSH_AUTH_SOCK=$(ssh-agent -s | grep -oP '(?<=SSH_AUTH_SOCK=)[^;]+')
# Add the keys to the agent
if [ -f ~/.ssh/id_ed25519 ]; then
ssh-add ~/.ssh/id_ed25519 > /dev/null 2>&1
fi
if [ -f ~/.ssh/hexasec ]; then
ssh-add ~/.ssh/hexasec > /dev/null 2>&1
fi
# Compilation flags # Compilation flags
# export ARCHFLAGS="-arch x86_64" # export ARCHFLAGS="-arch x86_64"