From ca9d31b17839aa8435153d58c44b5163b72549ce Mon Sep 17 00:00:00 2001 From: Bazaah Date: Wed, 17 Aug 2022 15:04:41 +0000 Subject: [PATCH] zshrc: fix zstyle ssh-agent forward option It appears that during rearranging yonks ago we accidentally sourced oh-my-zsh before we set this setting, leading to the ssh-agent _always_ creating a new agent, even when SSH_AUTH_SOCK had already been set. This a fairly minor problem, but it does leave to session lingering, and breaks programs that manage ssh-agent identities, like gnome-keyring, or systemd user session ssh-agent services. --- zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 4dbb67b..d2ba39a 100755 --- a/zshrc +++ b/zshrc @@ -136,6 +136,7 @@ fi if [[ -d ~/.ssh ]] then zstyle :omz:plugins:ssh-agent lifetime 36h + zstyle :omz:plugins:ssh-agent agent-forwarding on if [[ -e ~/.ssh/autoload ]] then zstyle :omz:plugins:ssh-agent identities $( cat ~/.ssh/autoload ) @@ -144,8 +145,6 @@ fi [[ -d $ZSH ]] && source $ZSH/oh-my-zsh.sh -zstyle :omz:plugins:ssh-agent agent-forwarding on - # Dynamic Completion foreach cmd in kubectl kubeadm ( which $cmd &>/dev/null ) && source <($cmd completion zsh)