-# from https://unix.stackexchange.com/a/55935
-a_prompt() {
- cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
- 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