mirror of
https://github.com/bgrolleman/dotfiles.git
synced 2026-08-09 04:31:44 +02:00
Add setup keychain ssh agent
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user