diff options
-rw-r--r-- | zsh/.zshrc | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -93,12 +93,20 @@ export WORKON_HOME="~/Code/PyEnvs" export EDITOR="vim" export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" -#if [[ "$SSH_AGENT_PID" == "" ]]; then -# eval $(<~/.ssh-agent-thing) -#fi +if [ -f ~/.ssh/agent.env ] ; then + . ~/.ssh/agent.env > /dev/null + if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then + echo "Stale agent file found. Spawning new agent… " + eval `ssh-agent | tee ~/.ssh/agent.env` + #ssh-add + fi +else + echo "Starting ssh-agent" + eval `ssh-agent | tee ~/.ssh/agent.env` + #ssh-add +fi source /usr/bin/virtualenvwrapper.sh source /home/daniel/.profile -# added by travis gem -[ -f /home/daniel/.travis/travis.sh ] && source /home/daniel/.travis/travis.sh +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh |