From 87492b02e5ad430bb0e9d6a749f8e9dccb8cbf98 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 13 Mar 2024 10:40:28 +0000 Subject: Adds code to run ssh-agent --- fish2024/config.fish | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fish2024') diff --git a/fish2024/config.fish b/fish2024/config.fish index 68f99a3..1aa91d5 100644 --- a/fish2024/config.fish +++ b/fish2024/config.fish @@ -4,4 +4,12 @@ if status is-interactive set -U fish_greeting set -gx LEDGER_FILE $HOME/Budget/hledger/hledger/budget.ledger end + +# https://gist.github.com/josh-padnick/c90183be3d0e1feb89afd7573505cab3 +if test -z (pgrep ssh-agent) + eval (ssh-agent -c) > /dev/null + set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK + set -Ux SSH_AGENT_PID $SSH_AGENT_PID +end + . ~/perl5/perlbrew/etc/perlbrew.fish -- cgit v1.2.3