diff --git a/includes/bash_ssh.bash b/includes/bash_ssh.bash new file mode 100644 index 0000000..7bc5f15 --- /dev/null +++ b/includes/bash_ssh.bash @@ -0,0 +1,11 @@ +#!/bin/bash +[ -f "$HOME/.ssh/*.key" ] || return; + +if [ -z "$SSH_AUTH_SOCK" ] ; then + eval `ssh-agent -s` +fi + +for key in $HOME/.ssh/*.key; do + ssh-add $key +done; + diff --git a/tilde/bash_profile.bash b/tilde/bash_profile.bash index 9b86b1a..1cc299b 100644 --- a/tilde/bash_profile.bash +++ b/tilde/bash_profile.bash @@ -70,7 +70,7 @@ NOCOLOR="$(tput sgr0)" export EDITOR=`which vim` # Load prompt and aliases -for file in ~/dotfiles/includes/bash_{prompt,aliases,functions,git,completion}.bash; do +for file in ~/dotfiles/includes/bash_*.bash; do [ -r "$file" ] && source "$file" done unset file