From 4f87b9b942dc27fff0fc57a0419837cebf5a2c5e Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 16 Nov 2023 09:37:59 -0600 Subject: [PATCH 1/1] zprofile: quietly check for running ssh agent --- etc/zsh/.zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/zsh/.zprofile b/etc/zsh/.zprofile index a55b7e6..399456b 100644 --- a/etc/zsh/.zprofile +++ b/etc/zsh/.zprofile @@ -179,7 +179,7 @@ if [[ ! -v _sev_setup_ssh ]] { if [[ -f $e ]] { IFS=$'\0' read -r sock pid <$e } - if [[ -S $sock && $pid > 0 ]] && kill -0 $pid; then + if [[ -S $sock && $pid > 0 ]] && kill -0 $pid >/dev/null 2>&1; then [[ -o interactive ]] && print -P "Reusing agent PID $pid%f" export SSH_AUTH_SOCK=$sock export SSH_AGENT_PID=$pid -- 2.47.0