summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2016-09-05 08:31:20 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-09-05 08:31:20 +0200
commit973a4e646c09b69e7d491d530826778f0d9d7e49 (patch)
tree07b444dd7b9e46d85b9ed4d69fc8a49e3e2ab175
parente92ac8932cf0b5ab5d7f4a662bb57c9039c47920 (diff)
downloadzsh-973a4e646c09b69e7d491d530826778f0d9d7e49.tar.gz
zsh-973a4e646c09b69e7d491d530826778f0d9d7e49.tar.bz2
zsh-973a4e646c09b69e7d491d530826778f0d9d7e49.zip
ssh-agent: fix non-standard process check w/ pgrep
Confirmed to work on MacOS, OpenBSD, Solaris and busybox.
-rw-r--r--plugins/ssh-agent/ssh-agent.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
index a84aac58c..b668fa3b2 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