1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-15 15:51:42 +00:00

Redirect the output of GPG and SSH agent plugins

This commit is contained in:
Sorin Ionescu
2012-03-07 18:05:01 -05:00
parent 6ac5c25e77
commit 7a745425c4
2 changed files with 5 additions and 7 deletions

View File

@ -13,14 +13,14 @@ if (( ! $+commands[gpg-agent] )); then
fi
function _gpg-agent-start() {
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}"
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}" > /dev/null
chmod 600 "${_gpg_env}"
source "${_gpg_env}"
source "${_gpg_env}" > /dev/null
}
# Source GPG agent settings, if applicable.
if [[ -f "${_gpg_env}" ]]; then
source "${_gpg_env}"
source "${_gpg_env}" > /dev/null
ps -ef | grep "${SSH_AGENT_PID}" | grep -q 'gpg-agent' || {
_gpg-agent-start
}