From 142ad842d706e16317bcc8b44ef1b19d625d1fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 21 Aug 2016 02:21:47 +0200 Subject: [PATCH] Simplify PID check of current ssh-agent --- 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 a427b80ae..e6bc9c4e6 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 x | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null || { + ps -o cmd -p $SSH_AGENT_PID | grep -q ssh-agent || { _start_agent } else