From 0c48c0aceecbc40e813f7ff8948f69ad63accbeb Mon Sep 17 00:00:00 2001 From: Sean Goller Date: Tue, 25 Sep 2012 16:13:26 -0700 Subject: [PATCH] Add support for toggling ssh key storage support in gpg-agent. --- modules/gpg-agent/init.zsh | 8 +++++++- runcoms/zpreztorc | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/gpg-agent/init.zsh b/modules/gpg-agent/init.zsh index 902466da..a6c33c1c 100644 --- a/modules/gpg-agent/init.zsh +++ b/modules/gpg-agent/init.zsh @@ -12,9 +12,15 @@ if (( ! $+commands[gpg-agent] )); then fi _gpg_env="$HOME/.gnupg/gpg-agent.env" +_gpg_ssh_enabled= +zstyle -b ':prezto:module:gpg-agent' ssh-support '_gpg_ssh_enabled' function _gpg-agent-start { - gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}" > /dev/null + _gpg_ssh_support= + if is-true "${_gpg_ssh_enabled}"; then + _gpg_ssh_support="--enable-ssh-support" + fi + gpg-agent --daemon ${_gpg_ssh_support} --write-env-file "${_gpg_env}" > /dev/null chmod 600 "${_gpg_env}" source "${_gpg_env}" > /dev/null } diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 66cddb52..fb64ea33 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -81,6 +81,13 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Auto start a session when Zsh is launched. # zstyle ':prezto:module:screen' auto-start 'yes' +# +# GPG-Agent +# + +# Allow GPG-Agent to handle SSH keys +# zstyle ':prezto:module:gpg-agent' ssh-support 'yes' + # # SSH-Agent #