(fix) new ssh-agent location

This commit is contained in:
2026-08-17 11:30:36 +02:00
parent fa6689c686
commit 43e9364e0a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ t() {
} }
z() { z() {
# if remote, link agent so a stale zellij env doesn't hurt agent # 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 ln -sf $SSH_AUTH_SOCK /tmp/agent.sock
export SSH_AUTH_SOCK=/tmp/agent.sock export SSH_AUTH_SOCK=/tmp/agent.sock
fi fi
+1 -1
View File
@@ -17,7 +17,7 @@ index 83548648..42ec378f 100644
else else
- _start_agent - _start_agent
+ # Don't start new one, if ssh-agent is forwarded + # 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 fi
# Don't add identities if lazy-loading is enabled # Don't add identities if lazy-loading is enabled