mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-24 19:56:31 +00:00
15 lines
319 B
Fish
15 lines
319 B
Fish
# Adds all private keys to ssh agent
|
|
|
|
# Adds a key to agent if it hasn't been added yet
|
|
function __maybe_ssh_add
|
|
for key in $argv
|
|
if grep -q 'PRIVATE KEY' $key
|
|
ssh-add -l | grep -q "$key" ;or ssh-add $key
|
|
end
|
|
end
|
|
end
|
|
|
|
function ssh-add-all
|
|
__maybe_ssh_add $HOME/.ssh/id_rsa_*
|
|
end
|