mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-06 03:10:35 +01:00
Fixed ssh-agent plugin when ssh-add is not in /usr/bin/ssh-add
This commit is contained in:
parent
96e4e5dd03
commit
840167afd6
1 changed files with 7 additions and 1 deletions
|
|
@ -45,7 +45,13 @@ function _plugin__start_agent()
|
||||||
zstyle -a :omz:plugins:ssh-agent identities identities
|
zstyle -a :omz:plugins:ssh-agent identities identities
|
||||||
echo starting ssh-agent...
|
echo starting ssh-agent...
|
||||||
|
|
||||||
/usr/bin/ssh-add $HOME/.ssh/${^identities}
|
if [ $(command -v ssh-add 2>/dev/null) ]; then
|
||||||
|
SSH_ADD=ssh-add
|
||||||
|
else
|
||||||
|
SSH_ADD=/usr/bin/ssh-add
|
||||||
|
fi
|
||||||
|
|
||||||
|
$SSH_ADD $HOME/.ssh/${^identities}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the filename to store/lookup the environment from
|
# Get the filename to store/lookup the environment from
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue