From 4606e3428d2785a0283dd7008be824a19dd3b61c Mon Sep 17 00:00:00 2001 From: mmill Date: Thu, 1 Dec 2022 23:49:23 +0100 Subject: [PATCH] Only start agent when status is interactive --- conf.d/fish-ssh-agent.fish | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/conf.d/fish-ssh-agent.fish b/conf.d/fish-ssh-agent.fish index 719087a..b111004 100644 --- a/conf.d/fish-ssh-agent.fish +++ b/conf.d/fish-ssh-agent.fish @@ -1,7 +1,9 @@ -if test -z "$SSH_ENV" - set -xg SSH_ENV $HOME/.ssh/environment -end +if status is-interactive + if test -z "$SSH_ENV" + set -xg SSH_ENV $HOME/.ssh/environment + end -if not __ssh_agent_is_started - __ssh_agent_start + if not __ssh_agent_is_started + __ssh_agent_start + end end