0c60f421cbbdf673fada8fc6e795d069d1ae972e

Author
Maximilian Güntner <code@maschinenpsychologe.de>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

ssh-agent: Use /usr/bin/env to find ssh-add

This change is important when ssh-add is not inside /usr/bin e.g.
on NixOS.

Signed-off-by: Maximilian Güntner <code@maschinenpsychologe.de>

Diff

 1diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
 2index b77b9ee78dd4f2f86b54fd3a5a18378f1da68f7b..24b6fd9d07194d7103f53f42e7677669c208453f 100644
 3--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
 4+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
 5@@ -45,7 +45,7 @@ function _plugin__start_agent()
 6   zstyle -a :omz:plugins:ssh-agent identities identities
 7   echo starting ssh-agent...
 8 
 9-  /usr/bin/ssh-add $HOME/.ssh/${^identities}
10+  /usr/bin/env ssh-add $HOME/.ssh/${^identities}
11 }
12 
13 # Get the filename to store/lookup the environment from