Skip to content

Commit

Permalink
[Fix sorin-ionescu#300] Disable SSH-Agent protocol emulation by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RIT80 authored and RIT80 committed Oct 1, 2012
1 parent ec63cf4 commit fb03552
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
9 changes: 9 additions & 0 deletions modules/gpg-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ GPG-Agent

Provides for an easier use of [gpg-agent][1].

Settings
--------

### SSH-Agent Protocol Emulation

To enable SSH-Agent protocol emulation, add the following line to *zpreztorc*:

zstyle ':prezto:module:gpg-agent' ssh-support 'yes'

Authors
-------

Expand Down
10 changes: 9 additions & 1 deletion modules/gpg-agent/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ fi
_gpg_env="$HOME/.gnupg/gpg-agent.env"

function _gpg-agent-start {
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}" > /dev/null
local ssh_support

zstyle -b ':prezto:module:gpg-agent' ssh-support 'ssh_support' \
|| ssh_support=''

gpg-agent \
--daemon ${ssh_support:+'--enable-ssh-support'}
--write-env-file "${_gpg_env}" > /dev/null

chmod 600 "${_gpg_env}"
source "${_gpg_env}" > /dev/null
}
Expand Down
7 changes: 7 additions & 0 deletions runcoms/zpreztorc
Original file line number Diff line number Diff line change
Expand Up @@ -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
#

# Enable SSH-Agent protocol emulation.
# zstyle ':prezto:module:gpg-agent' ssh-support 'yes'

#
# SSH-Agent
#
Expand Down

0 comments on commit fb03552

Please sign in to comment.