From: sev Date: Thu, 16 Nov 2023 15:37:59 +0000 (-0600) Subject: zprofile: quietly check for running ssh agent X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/4f87b9b942dc27fff0fc57a0419837cebf5a2c5e?hp=afd175d70294e36f0ff2d80d96bbd434b4a55d91 zprofile: quietly check for running ssh agent --- 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