]> arthur.barton.de Git - ax-zsh.git/blobdiff - plugins/ssh_macos/ssh_macos.zprofile
ssh_macos: Import SSH keys from Keychain in the background
[ax-zsh.git] / plugins / ssh_macos / ssh_macos.zprofile
index 5f7dcd960ac1c722c49a24e1c81a7191202093b9..27e3450e5a31f7ec0ca090b6b133be317667d063 100644 (file)
@@ -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 &!