From 6fa7c01922f58046db93856c64c81a731a090f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20W=C3=BChr?= Date: Mon, 19 Feb 2024 09:26:12 +0100 Subject: [PATCH] Add proper ssh-agent loading --- dotconf/bashrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotconf/bashrc b/dotconf/bashrc index 7cb3997..a61421f 100644 --- a/dotconf/bashrc +++ b/dotconf/bashrc @@ -34,10 +34,16 @@ source "$OSH"/oh-my-bash.sh export LANG=de_DE.UTF-8 -eval `ssh-agent` +if [ ! -S ~/.ssh/ssh_auth_sock ]; then + eval `ssh-agent` + ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock +fi +export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock +ssh-add -l > /dev/null || ssh-add alias c="composer" alias dc="docker compose" +alias gu="gitup" [ ! -z "$(which starship)" ] && eval "$(starship init bash)" [ ! -z "$(which direnv)" ] && eval "$(direnv hook bash)"