summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-01-02 16:45:06 +0100
committerDaniel Schadt <kingdread@gmx.de>2020-01-02 16:45:06 +0100
commitfe5c3dab744348b4c11fd8d56c67da8867a9df80 (patch)
treea4bbd092ba8ade0efa6173574f7f1adc827f6d7a
parenta02a54c2187a56b6f4397e47449892847c9a8801 (diff)
downloaddotfiles-fe5c3dab744348b4c11fd8d56c67da8867a9df80.tar.gz
dotfiles-fe5c3dab744348b4c11fd8d56c67da8867a9df80.tar.bz2
dotfiles-fe5c3dab744348b4c11fd8d56c67da8867a9df80.zip
{zsh] better ssh-agent handling & fzf
-rw-r--r--zsh/.zshrc18
1 files changed, 13 insertions, 5 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 5a9bf69..2b34035 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -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