mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 13:50:09 +00:00
Simplify PID check of current ssh-agent
This commit is contained in:
parent
cb0833ac13
commit
142ad842d7
1 changed files with 1 additions and 1 deletions
|
@ -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 x | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null || {
|
ps -o cmd -p $SSH_AGENT_PID | grep -q ssh-agent || {
|
||||||
_start_agent
|
_start_agent
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue