mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 07:52:15 +08:00
Compare commits
11 Commits
4ae2f8a242
...
d75508c461
Author | SHA1 | Date | |
---|---|---|---|
|
d75508c461 | ||
|
427268c64f | ||
|
61d7dc9a72 | ||
|
2388b8f873 | ||
|
4c7ac6ff2e | ||
|
2fc2920349 | ||
|
7d32a08454 | ||
|
2e1b45c048 | ||
|
a170d5b2b2 | ||
|
5ebe88bfe0 | ||
|
d66a0998d4 |
@ -1 +1 @@
|
||||
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5
|
||||
Subproject commit e52ee8ca55bcc56a17c828767a3f98f22a68d4eb
|
@ -1 +1 @@
|
||||
Subproject commit 978e79e12c44b5b1d3e1e2920c537002087b82c2
|
||||
Subproject commit c160d09fddd28ceb3af5cf80e9253af80e450d96
|
@ -11,16 +11,18 @@ 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="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/gpg-agent.env"
|
||||
_gpg_agent_socket="$(gpgconf --list-dir agent-socket)"
|
||||
|
||||
# Load environment variables from previous run
|
||||
source "$_gpg_agent_env" 2> /dev/null
|
||||
|
||||
|
||||
# Start gpg-agent if not started.
|
||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; then
|
||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; 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
|
||||
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q "gpg-agent"; then
|
||||
mkdir -p "$_gpg_agent_env:h"
|
||||
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
|
||||
fi
|
||||
@ -48,7 +50,7 @@ if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
||||
fi
|
||||
|
||||
# Clean up.
|
||||
unset _gpg_agent_{conf,env}
|
||||
unset _gpg_agent_{conf,env,socket}
|
||||
|
||||
# Disable GUI prompts inside SSH.
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8dd05bfcc12b0cd1ee9ea64be725b3d9f713cf64
|
||||
Subproject commit 87ce96b1862928d84b1afe7c173316614b30e301
|
@ -35,7 +35,6 @@ fi
|
||||
if [[ -S "$SSH_AUTH_SOCK" && "$SSH_AUTH_SOCK" != "$_ssh_agent_sock" ]]; then
|
||||
mkdir -p "$_ssh_agent_sock:h"
|
||||
ln -sf "$SSH_AUTH_SOCK" "$_ssh_agent_sock"
|
||||
export SSH_AUTH_SOCK="$_ssh_agent_sock"
|
||||
fi
|
||||
|
||||
# Load identities.
|
||||
|
Loading…
Reference in New Issue
Block a user