summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-03-13 10:40:28 +0000
committerMatthew Lemon <y@yulqen.org>2024-03-13 10:40:28 +0000
commit87492b02e5ad430bb0e9d6a749f8e9dccb8cbf98 (patch)
treec40d03eb2636a0ce96cc4c9928fbb301956ae0de
parentc1aa9554cb29dafacdd0ed05b0cb5bdb28b52a7d (diff)
Adds code to run ssh-agent
-rw-r--r--fish2024/config.fish8
1 files changed, 8 insertions, 0 deletions
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