Permalink
Browse files

Add ssh-agent config. Switch to zsh.

  • Loading branch information...
1 parent b5b6bba commit 1aa767181a15d7c8b8a8d21ad400286ae5bd9378 @tsvetomir committed Dec 5, 2011
Showing with 21 additions and 5 deletions.
  1. +1 −1 screenrc
  2. +20 −4 zshrc
View
@@ -16,7 +16,7 @@ termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
attrcolor b ".I"
# erase background with current bg color
defbce "on"
-shell bash
+shell zsh
bindkey "^[1" select 0
bindkey "^[2" select 1
View
@@ -87,9 +87,25 @@ export PATH=$HOME/.bin/:/usr/local/bin:$PATH
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
-if [ -d "/opt/local/bin" ]; then
- export PATH=/opt/local/bin:$PATH
-fi
+# SSH agent
+test=`/bin/ps -ef | /bin/grep ssh-agent | /bin/grep -v grep | /usr/bin/awk '{print $2}' | xargs`
+
+if [ "$test" = "" ]; then
+ # there is no agent running
+ if [ -e "$HOME/agent.sh" ]; then
+ # remove the old file
+ /bin/rm -f $HOME/agent.sh
+ fi;
+ # start a new agent
+ /usr/bin/ssh-agent | /bin/grep -v echo >&$HOME/agent.sh
+fi;
+
+test -e $HOME/agent.sh && source $HOME/agent.sh
+
+alias kagent="kill -9 $SSH_AGENT_PID"
+
+# Disable suspend on Ctrl+S
+stty -ixon
-[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
+cd ~/github/kendo

0 comments on commit 1aa7671

Please sign in to comment.