From 973a4e646c09b69e7d491d530826778f0d9d7e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 5 Sep 2016 08:31:20 +0200 Subject: [PATCH] ssh-agent: fix non-standard process check w/ pgrep Confirmed to work on MacOS, OpenBSD, Solaris and busybox. --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index a84aac58..b668fa3b 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -30,7 +30,7 @@ if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then elif [[ -f "$_ssh_env_cache" ]]; then # Source SSH settings, if applicable . $_ssh_env_cache > /dev/null - ps -o cmd -p $SSH_AGENT_PID | grep -q ssh-agent || { + pgrep ssh-agent | grep -q $SSH_AGENT_PID || { _start_agent } else