From 43e9364e0a9c510ee94236e146a00a2db28045d3 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Mon, 17 Aug 2026 11:29:58 +0200 Subject: [PATCH] (fix) new ssh-agent location --- files/shell/.shellrc.alias | 2 +- patches/ssh-agent-location.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 8148982..48ba711 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -52,7 +52,7 @@ t() { } z() { # if remote, link agent so a stale zellij env doesn't hurt agent - if [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]]; then + if [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]] || [[ $SSH_AUTH_SOCK =~ "$HOME/.ssh/agent" ]]; then ln -sf $SSH_AUTH_SOCK /tmp/agent.sock export SSH_AUTH_SOCK=/tmp/agent.sock fi diff --git a/patches/ssh-agent-location.patch b/patches/ssh-agent-location.patch index 155c4ef..5786b3c 100644 --- a/patches/ssh-agent-location.patch +++ b/patches/ssh-agent-location.patch @@ -17,7 +17,7 @@ index 83548648..42ec378f 100644 else - _start_agent + # Don't start new one, if ssh-agent is forwarded -+ [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]] || _start_agent ++ [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]] || [[ $SSH_AUTH_SOCK =~ "$HOME/.ssh/agent" ]] || _start_agent fi # Don't add identities if lazy-loading is enabled