From 0dd992eb2f05f3baee4db54deff0263c984cdff9 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 13 Sep 2023 00:02:04 -0400 Subject: [PATCH] Use systemd ssh-agent user unit socket if available --- zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zshrc b/zshrc index 8e8c0e3..9fed757 100644 --- a/zshrc +++ b/zshrc @@ -36,6 +36,10 @@ COMPLETION_WAITING_DOTS="true" # much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" +if [[ -e "${XDG_RUNTIME_DIR}/ssh-agent.socket" ]]; then + export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket" +fi + path=( $HOME/.rbenv/shims $HOME/.pyenv/shims