Update .config/fish/config.fish

This commit is contained in:
Thomas Brasdefer 2024-12-19 16:59:12 +01:00
parent 96b5d75d41
commit c3940fa88b
Signed by: tombdf
GPG Key ID: A047E76CC4582988

View File

@ -37,13 +37,18 @@ if not set -q fish_inclusion
set -eU fish_inclusion
end
# Set the ssh keys
# Set the ssh agent
if not pgrep ssh-agent > /dev/null
eval (ssh-agent -c | string split ';')
end
set -x SSH_AUTH_SOCK (ssh-agent -s | grep -oP '(?<=SSH_AUTH_SOCK=)[^;]+')
ssh-add ~/.ssh/id_ed25519 &> /dev/null
ssh-add ~/.ssh/hexasec &> /dev/null
# Set the ssh keys
if [ -f ~/.ssh/id_ed25519 ]; and not ssh-add -l | grep -q id_ed25519
ssh-add ~/.ssh/id_ed25519 > /dev/null 2>&1
end
if [ -f ~/.ssh/hexasec ]; and not ssh-add -l | grep -q hexasec
ssh-add ~/.ssh/hexasec > /dev/null 2>&1
end
# Set personal aliases
# For a full list of active aliases, run `alias`.