mirror of
https://github.com/bgrolleman/dotfiles.git
synced 2026-08-09 04:31:44 +02:00
16 lines
465 B
Fish
16 lines
465 B
Fish
# 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
|