summaryrefslogtreecommitdiff
path: root/plugins/ssh-agent/ssh-agent.plugin.zsh
diff options
context:
space:
mode:
authorWill Boyce <wrboyce@users.noreply.github.com>2021-03-15 21:51:33 +0000
committerGitHub <noreply@github.com>2021-03-15 22:51:33 +0100
commit0e232d48537bd6f2c3ccbb4c96810fddffc7cfae (patch)
tree28560aa627c98f80d56c009e97d6b07428e921e7 /plugins/ssh-agent/ssh-agent.plugin.zsh
parent90bdb8a1561b8eef759c8e46a31845265f8cb9b9 (diff)
downloadzsh-0e232d48537bd6f2c3ccbb4c96810fddffc7cfae.tar.gz
zsh-0e232d48537bd6f2c3ccbb4c96810fddffc7cfae.tar.bz2
zsh-0e232d48537bd6f2c3ccbb4c96810fddffc7cfae.zip
feat(ssh-agent): add `ssh-add-args` setting (#7908)
* ssh-agent: add `:omz:plugins:ssh-agent ssh_add_args` option * Clean up and document extra setting * Document valid ssh-add arguments Co-authored-by: Marc Cornellà <hello@mcornella.com>
Diffstat (limited to 'plugins/ssh-agent/ssh-agent.plugin.zsh')
-rw-r--r--plugins/ssh-agent/ssh-agent.plugin.zsh4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
index 6ab041c21..430647135 100644
--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
@@ -48,7 +48,9 @@ function _add_identities() {
fi
done
- [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded}
+ local args
+ zstyle -a :omz:plugins:ssh-agent ssh-add-args args
+ [[ -n "$not_loaded" ]] && ssh-add "${args[@]}" ${^not_loaded}
}
# Get the filename to store/lookup the environment from