From 83ec437fefe2fbfb985d0bc5d5d78685d6958f4b Mon Sep 17 00:00:00 2001 From: Lachlan Donald Date: Sun, 5 Oct 2025 21:51:51 +1100 Subject: [PATCH] fix: simplify Match exec to avoid zsh completion parsing issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove complex quoting from Match exec directive that was causing zsh completion to fail with "unmatched '" error. Changed from: Match host * exec "sh -c 'test -z \"$SSH_CONNECTION\"'" To: Match host * exec "test -z $SSH_CONNECTION" The simpler form works correctly: - SSH_CONNECTION unset → uses 1Password IdentityAgent - SSH_CONNECTION set → skips IdentityAgent, uses forwarded agent And avoids breaking zsh's SSH host completion which parses the config file. --- ssh/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh/config b/ssh/config index f386da7..2f0ac36 100644 --- a/ssh/config +++ b/ssh/config @@ -14,5 +14,5 @@ Host * StrictHostKeyChecking=accept-new # 1Password agent - use unless in SSH session (forwarded agent) -Match host * exec "sh -c 'test -z \"$SSH_CONNECTION\"'" +Match host * exec "test -z $SSH_CONNECTION" IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"