1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-29 09:10:07 +00:00

ssh-agent: fix non-standard process check w/ pgrep

Confirmed to work on MacOS, OpenBSD, Solaris and busybox.
This commit is contained in:
Marc Cornellà 2016-09-05 08:31:20 +02:00
parent e92ac8932c
commit 973a4e646c

View file

@ -30,7 +30,7 @@ if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
elif [[ -f "$_ssh_env_cache" ]]; then elif [[ -f "$_ssh_env_cache" ]]; then
# Source SSH settings, if applicable # Source SSH settings, if applicable
. $_ssh_env_cache > /dev/null . $_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 _start_agent
} }
else else