X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/169b607c432b23ead7138252ab529093578c34c4..6e39e3a24b092de97e70563e66ff08a4b8dd1674:/.bashrc diff --git a/.bashrc b/.bashrc index f4fa270..309cbd1 100644 --- a/.bashrc +++ b/.bashrc @@ -45,3 +45,10 @@ a_prompt() { printf $cwd } PS1="\u@\h \$(a_prompt)> " + +if ! pgrep -u "$USER" ssh-agent > /dev/null; then + ssh-agent > ~/.ssh-agent-thing +fi +if [[ ! "$SSH_AUTH_SOCK" ]]; then + eval "$(<~/.ssh-agent-thing)" +fi