From 96df682f82dbd312f726658e8e44becca98edcbc Mon Sep 17 00:00:00 2001 From: nasenatmer Date: Fri, 26 Apr 2013 12:30:04 +0100 Subject: [PATCH] [Fix #419] start gpg-agent also with ssh-support off and add a note on the variables exported by this module --- modules/gpg-agent/README.md | 9 ++++++++- modules/gpg-agent/init.zsh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/gpg-agent/README.md b/modules/gpg-agent/README.md index 1b222d46..9819665e 100644 --- a/modules/gpg-agent/README.md +++ b/modules/gpg-agent/README.md @@ -12,6 +12,14 @@ To enable SSH-Agent protocol emulation, add the following line to *zpreztorc*: zstyle ':prezto:module:gpg-agent' ssh-support 'yes' +Variables +--------- + +Please note that if you use this agent, the variables will only be visible to +other instances of zsh. Should you use a non-shell mail user agent such as +thunderbird, make sure it inherits the variables. For an example how to +achieve this, have a look at issue #419 in the [issue tracker][2]. + Authors ------- @@ -22,4 +30,3 @@ Authors [1]: http://linux.die.net/man/1/gpg-agent [2]: https://github.com/sorin-ionescu/prezto/issues - diff --git a/modules/gpg-agent/init.zsh b/modules/gpg-agent/init.zsh index 82bd9a2e..4f2af337 100644 --- a/modules/gpg-agent/init.zsh +++ b/modules/gpg-agent/init.zsh @@ -33,7 +33,7 @@ function _gpg-agent-start { # Source GPG agent settings, if applicable. if [[ -s "${_gpg_env}" ]]; then source "${_gpg_env}" > /dev/null - ps -ef | grep "${SSH_AGENT_PID}" | grep -q 'gpg-agent' || { + ps --no-headers -C 'gpg-agent' || { _gpg-agent-start } else