2019-02-24 12:28:35 +00:00
|
|
|
if [[ ! -f $ZSH_CONFIG_DIR/scripts/ssh-find-agent.sh ]]; then
|
|
|
|
print_dbg "No ssh-find-agent.sh script available but required by 1-ssh-agent-autoconfiguration.\n"
|
|
|
|
return
|
|
|
|
fi
|
2019-02-18 16:55:05 +00:00
|
|
|
|
2019-02-24 12:28:35 +00:00
|
|
|
source $ZSH_CONFIG_DIR/scripts/ssh-find-agent.sh
|
2019-02-18 16:55:05 +00:00
|
|
|
|
|
|
|
# Automatically add ssh-agent to any new ssh connection
|
|
|
|
ssh-find-agent -a
|
|
|
|
if [ -z "$SSH_AUTH_SOCK" ]
|
|
|
|
then
|
|
|
|
eval $(ssh-agent) > /dev/null
|
|
|
|
ssh-add -l >/dev/null || alias ssh='ssh-add -l >/dev/null || ssh-add && unalias ssh; ssh'
|
2019-02-24 12:28:35 +00:00
|
|
|
fi
|