From 42489c45c36d31b4c95d507f40b1bc8c75e04b05 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 8 Dec 2023 10:58:00 -0600 Subject: [PATCH] revert '0c02db7 refactor(zsh): improve handling of ssh-agent' --- dots/.config/zsh/config/profile/profile/env.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dots/.config/zsh/config/profile/profile/env.zsh b/dots/.config/zsh/config/profile/profile/env.zsh index 3d885465..c895d7c0 100644 --- a/dots/.config/zsh/config/profile/profile/env.zsh +++ b/dots/.config/zsh/config/profile/profile/env.zsh @@ -59,9 +59,10 @@ export TIMEFMT export REPORTTIME=600 ### SSH ### -export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-$XDG_RUNTIME_DIR/ssh-agent.sock}" -ssh-add &>/dev/null -[[ "${?}" -gt 2 ]] && eval "$(ssh-agent -a "${SSH_AUTH_SOCK}")" &>/dev/null +export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.sock" +ssh-add -l >/dev/null +[ $? -ge 2 ] && ssh-agent -a "$SSH_AUTH_SOCK" -t 24h >/dev/null + ### FZF ### export FZF_DEFAULT_COMMAND='fd --hidden --exclude .git --color=always'