mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
fix: load agents from zstyle
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
5d0b4ca514
commit
329486c335
1 changed files with 6 additions and 1 deletions
|
|
@ -29,12 +29,17 @@ function {
|
|||
# Keychain 3.x: subcommand-based CLI, no --agents.
|
||||
keychain add ${^options:-} --host $SHORT_HOST ${^identities}
|
||||
else
|
||||
local agents
|
||||
|
||||
# load agents to start (only used by keychain < 2.9).
|
||||
zstyle -s :omz:plugins:keychain agents agents
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if [[ "${version_string:l}" =~ 'keychain ([0-9]+\.[0-9]+)' ]] && \
|
||||
is-at-least 2.9 "$match[1]"; then
|
||||
keychain ${^options:-} ${^identities} --host $SHORT_HOST
|
||||
else
|
||||
keychain ${^options:-} --agents ${agents:-ssh} ${^identities} --host $SHORT_HOST
|
||||
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue