From 5bd9500bf4e68bf185db77ad4ecbb728a5b81c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 17 Sep 2016 13:01:10 +0200 Subject: [PATCH] ssh-agent: check ssh-agent process w/ ps again The alternative is using tools that aren't available everywhere. The latest report is that cygwin/msys2 doesn't have pgrep. Fixes #5418. --- 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 b668fa3b2..20f97c6f1 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 - pgrep ssh-agent | grep -q $SSH_AGENT_PID || { + ps x | grep ssh-agent | grep -q $SSH_AGENT_PID || { _start_agent } else