Use gpg-agent setup from the manpage

This commit is contained in:
Marko Korhonen 2022-08-29 20:45:07 +03:00
parent e6bd26af9c
commit 0ed3009e7a

View file

@ -58,16 +58,14 @@ export MANPAGER="$EDITOR +\"lua require 'pager'\" +Man!"
export SYSTEMD_EDITOR=$EDITOR export SYSTEMD_EDITOR=$EDITOR
export SYSTEMD_PAGER=less export SYSTEMD_PAGER=less
if [ "$SSH_CONNECTION" = "" ]; then
{%@@ if os == "arch" or os == "ubuntu" @@%} {%@@ if os == "arch" or os == "ubuntu" @@%}
# set SSH_AUTH_SOCK if not logging in over SSH if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export GPG_TTY="$(tty)" export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) fi
gpgconf --launch gpg-agent gpgconf --launch gpg-agent
{%@@ elif os == "termux" @@%} {%@@ elif os == "termux" @@%}
eval $(okc-ssh-agent) eval $(okc-ssh-agent)
{%@@ endif @@%} {%@@ endif @@%}
fi
# Enable grc colorization of supported commands # Enable grc colorization of supported commands
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh [[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh