From 2e1b45c0484ff3d6760c78e160c0c341f14520da Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sat, 26 Jan 2019 11:17:20 +0800 Subject: [PATCH] gpg modules: use gpgconf for other variable --- modules/gpg/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gpg/init.zsh b/modules/gpg/init.zsh index 3bac09b1..9350af0f 100644 --- a/modules/gpg/init.zsh +++ b/modules/gpg/init.zsh @@ -11,9 +11,9 @@ if (( ! $+commands[gpg-agent] )); then fi # Set the default paths to gpg-agent files. -_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf" +_gpg_agent_conf="$(gpgconf --list-dir homedir)/gpg-agent.conf" _gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID" -_gpg_agent_socket="$(gpgconf --list-dir | grep "agent-socket:.*" | sed "s/agent-socket://")" +_gpg_agent_socket="$(gpgconf --list-dir agent-socket)" # Load environment variables from previous run source "$_gpg_agent_env" 2> /dev/null