m 2 zsh-user: use gpg-agent 2.1 style daemon
This commit is contained in:
parent
123f1f4b6b
commit
964062c807
@ -22,15 +22,11 @@ in
|
|||||||
bindkey "\e[3~" delete-char
|
bindkey "\e[3~" delete-char
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
|
|
||||||
# load gpg-agent
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||||
envfile="$HOME/.gnupg/gpg-agent.env"
|
GPG_TTY=$(tty)
|
||||||
if [ -e "$envfile" ] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
|
export GPG_TTY
|
||||||
eval "$(cat "$envfile")"
|
unset SSH_AGENT_PID
|
||||||
else
|
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||||
eval "$(${pkgs.gnupg}/bin/gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"
|
|
||||||
fi
|
|
||||||
export GPG_AGENT_INFO
|
|
||||||
export SSH_AUTH_SOCK
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
promptInit = ''
|
promptInit = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user