Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add ssh-agent config. Switch to zsh.

  • Loading branch information...
commit 1aa767181a15d7c8b8a8d21ad400286ae5bd9378 1 parent b5b6bba
Tsvetomir Tsonev authored

Showing 2 changed files with 21 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 1  screenrc
  2. +20 4 zshrc
2  screenrc
@@ -16,7 +16,7 @@ termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
16 16 attrcolor b ".I"
17 17 # erase background with current bg color
18 18 defbce "on"
19   -shell bash
  19 +shell zsh
20 20
21 21 bindkey "^[1" select 0
22 22 bindkey "^[2" select 1
24 zshrc
@@ -87,9 +87,25 @@ export PATH=$HOME/.bin/:/usr/local/bin:$PATH
87 87
88 88 export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
89 89
90   -if [ -d "/opt/local/bin" ]; then
91   - export PATH=/opt/local/bin:$PATH
92   -fi
  90 +# SSH agent
  91 +test=`/bin/ps -ef | /bin/grep ssh-agent | /bin/grep -v grep | /usr/bin/awk '{print $2}' | xargs`
  92 +
  93 +if [ "$test" = "" ]; then
  94 + # there is no agent running
  95 + if [ -e "$HOME/agent.sh" ]; then
  96 + # remove the old file
  97 + /bin/rm -f $HOME/agent.sh
  98 + fi;
  99 + # start a new agent
  100 + /usr/bin/ssh-agent | /bin/grep -v echo >&$HOME/agent.sh
  101 +fi;
  102 +
  103 +test -e $HOME/agent.sh && source $HOME/agent.sh
  104 +
  105 +alias kagent="kill -9 $SSH_AGENT_PID"
  106 +
  107 +# Disable suspend on Ctrl+S
  108 +stty -ixon
93 109
94   -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
  110 +cd ~/github/kendo
95 111

0 comments on commit 1aa7671

Please sign in to comment.
Something went wrong with that request. Please try again.