diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index dc2e5ea..a2f016e 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -246,10 +246,15 @@ function _ssh_agent_plugin_add_identities() { local _ssh_agent_plugin_identity for _ssh_agent_plugin_identity in ${^_ssh_agent_plugin_identities}; do + _ssh_agent_plugin_debug "Handling identity ${_ssh_agent_plugin_identity}." + local _ssh_agent_plugin_identity_path + _ssh_agent_plugin_identity_path="${_ssh_agent_plugin_directory}/${_ssh_agent_plugin_identity}" if [ -r "${_ssh_agent_plugin_identity_path}" ]; then + _ssh_agent_plugin_debug "Trying to add identity ${_ssh_agent_plugin_identity_path}" + ssh-add -l | awk '{print $3}' | grep -q "${_ssh_agent_plugin_identity_path}" if [ $? -ne 0 ]; then