summaryrefslogtreecommitdiff
path: root/plugins/keychain
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2020-05-26 17:59:45 +0200
committerMarc Cornellà <marc.cornella@live.com>2020-05-26 18:05:12 +0200
commit2d6965f85645ea489b0adf8ce6a79dd55036d883 (patch)
tree9cadac649f6f277f80fca843b816cde9c9df138b /plugins/keychain
parent68d51bd7d83050589ca602059a6e2fb26c2cec39 (diff)
downloadzsh-2d6965f85645ea489b0adf8ce6a79dd55036d883.tar.gz
zsh-2d6965f85645ea489b0adf8ce6a79dd55036d883.tar.bz2
zsh-2d6965f85645ea489b0adf8ce6a79dd55036d883.zip
Fix load of various plugins: fastfile, keychain, sfffe, stack
Diffstat (limited to 'plugins/keychain')
-rw-r--r--plugins/keychain/keychain.plugin.zsh9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh
index 1babf5a30..f122f7982 100644
--- a/plugins/keychain/keychain.plugin.zsh
+++ b/plugins/keychain/keychain.plugin.zsh
@@ -1,7 +1,9 @@
+(( $+commands[keychain] )) || return
+
# Define SHORT_HOST if not defined (%m = host name up to first .)
SHORT_HOST=${SHORT_HOST:-${(%):-%m}}
-function _start_agent() {
+function {
local agents
local -a identities
local -a options
@@ -28,8 +30,3 @@ function _start_agent() {
[ -f "$_keychain_env_sh" ] && . "$_keychain_env_sh"
[ -f "$_keychain_env_sh_gpg" ] && . "$_keychain_env_sh_gpg"
}
-
-_start_agent
-
-# tidy up after ourselves
-unfunction _start_agent