From e250df829ef8064261f02c4689d04709d5a8e788 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 8 Mar 2012 21:55:38 -0500 Subject: [PATCH] Fix SSH agent identities check, close #19 --- plugins/ssh-agent/init.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ssh-agent/init.zsh b/plugins/ssh-agent/init.zsh index 4a139f3..0e05653 100644 --- a/plugins/ssh-agent/init.zsh +++ b/plugins/ssh-agent/init.zsh @@ -35,10 +35,10 @@ function _ssh-agent-start() { # Load identities. zstyle -a ':omz:plugin:ssh-agent' identities 'identities' - if [[ ! -n "${identities}" ]]; then - ssh-add + if (( ${#identities} > 0 )); then + ssh-add "${HOME}/.ssh/${^identities[@]}" else - ssh-add "${HOME}/.ssh/${^identities}" + ssh-add fi }