From f914897699882ed9ee3d454528c4556f80cbd973 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 28 Jan 2023 19:03:55 -0600 Subject: [PATCH] feat(zsh): permit ssh-agent to be multi-session --- dots/.config/zsh/config/profile/profile/env.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dots/.config/zsh/config/profile/profile/env.zsh b/dots/.config/zsh/config/profile/profile/env.zsh index 5a0240a9..35df3236 100644 --- a/dots/.config/zsh/config/profile/profile/env.zsh +++ b/dots/.config/zsh/config/profile/profile/env.zsh @@ -9,7 +9,9 @@ export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=2 export ZSH_AUTOSUGGEST_STRATEGY=(history completion) ### SSH ### -eval "$(ssh-agent -s)" >/dev/null 2>&1 +export SSH_AUTH_SOCK="${HOME}/.ssh/ssh-agent.sock" +ssh-add -l >/dev/null 2>&1 +[ $? -ge 2 ] && ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null ### FZF ###