1c879f67b4380f0705ee1bc578d5aab53bf192a4

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix(ssh-agent): silence `ssh-add` if quiet mode is enabled (#11201)

Fixes #11201

Diff

 1diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
 2index 0d6a35b3524dfe42ded4e0ed8a7957e8b8b2dd42..78ac46b13815a199807e94e7401839241a364634 100644
 3--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
 4+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
 5@@ -72,6 +72,9 @@ function _add_identities() {
 6   local args
 7   zstyle -a :omz:plugins:ssh-agent ssh-add-args args
 8 
 9+  # if ssh-agent quiet mode, pass -q to ssh-add
10+  zstyle -t :omz:plugins:ssh-agent quiet && args=(-q $args)
11+
12   # use user specified helper to ask for password (ksshaskpass, etc)
13   local helper
14   zstyle -s :omz:plugins:ssh-agent helper helper