mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-06 05:49:25 +00:00
Make .zcomp* location configurable (#1842)
This commit is contained in:
@ -12,7 +12,7 @@ fi
|
||||
|
||||
# Set the default paths to gpg-agent files.
|
||||
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
|
||||
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
|
||||
_gpg_agent_env="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/gpg-agent.env"
|
||||
|
||||
# Load environment variables from previous run
|
||||
source "$_gpg_agent_env" 2> /dev/null
|
||||
@ -21,6 +21,7 @@ source "$_gpg_agent_env" 2> /dev/null
|
||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; then
|
||||
# Start gpg-agent if not started.
|
||||
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
|
||||
mkdir -p "$_gpg_agent_env:h"
|
||||
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user