From 949bcb8f0d40218508f2844165b63c6df08cba78 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 18 Feb 2017 18:44:42 +0100 Subject: [PATCH 1/1] ssh_macos: Import SSH keys from Keychain in the background This can take quite same time (depending on the format and number of the SSH keys), so import the keys in the background to not delay the shell startup. --- plugins/ssh_macos/ssh_macos.zprofile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/ssh_macos/ssh_macos.zprofile b/plugins/ssh_macos/ssh_macos.zprofile index 5f7dcd9..27e3450 100644 --- a/plugins/ssh_macos/ssh_macos.zprofile +++ b/plugins/ssh_macos/ssh_macos.zprofile @@ -8,5 +8,6 @@ [[ $(uname -s) = "Darwin" ]] || return 1 [[ $(uname -r | cut -d'.' -f1) -ge 16 ]] || return 1 -# Load SSH keys from Keychain into SSH agent when the agent has no keys. -ssh-add -l >/dev/null || ssh-add -A >/dev/null 2>&1 +# Start a backgroud job that tries to load the SSH keys from Keychain into +# the SSH agent, when the agent has no keys. +ssh-add -l >/dev/null || ssh-add -A >/dev/null 2>&1 &! -- 2.39.2