Add setup keychain ssh agent

This commit is contained in:
2026-07-25 16:21:56 +02:00
parent 0835211ae9
commit f52815cc65
3 changed files with 46 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Start keychain and source SSH agent variables for all private keys in ~/.ssh
if status is-interactive
if type -q keychain
set -l _ssh_keys
for _pub in ~/.ssh/*.pub
set -l _key (string replace -r '\.pub$' '' $_pub)
if test -f $_key
set -a _ssh_keys $_key
end
end
if test (count $_ssh_keys) -gt 0
keychain --eval --quiet $_ssh_keys | source
end
end
end