Permalink
Browse files

add ssh helps

  • Loading branch information...
1 parent c79ee22 commit b6e8a021b0d6e6e21d65925ff36deef01dba7edd @plukevdh committed Feb 18, 2014
Showing with 25 additions and 10 deletions.
  1. +24 −0 home/.githelpers
  2. +1 −10 home/.vim/.netrwhist
View
@@ -65,3 +65,27 @@ cleanup_git_branches() {
echo "Done!"
fi
}
+
+SSH_ENV="$HOME/.ssh/environment"
+
+function start_agent {
+ echo "Initialising new SSH agent..."
+ /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
+ echo succeeded
+ chmod 600 "${SSH_ENV}"
+ . "${SSH_ENV}" > /dev/null
+ /usr/bin/ssh-add;
+}
+
+# Source SSH settings, if applicable
+
+if [ -f "${SSH_ENV}" ]; then
+ . "${SSH_ENV}" > /dev/null
+#ps ${SSH_AGENT_PID} doesn't work under cywgin
+ ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
+ start_agent;
+ }
+else
+ start_agent;
+fi
+
View
@@ -1,11 +1,2 @@
let g:netrw_dirhistmax =10
-let g:netrw_dirhist_cnt =9
-let g:netrw_dirhist_1='/Users/hungerandthirst/Code/Projects/crunchy/crunch'
-let g:netrw_dirhist_2='/Users/hungerandthirst/.homesick/repos/plukevdh/dotfiles/home/.vim/bundle/Command-T/ruby/command-t'
-let g:netrw_dirhist_3='/Users/hungerandthirst/Code/src/macvim/src'
-let g:netrw_dirhist_4='/Users/hungerandthirst/.homesick/repos/plukevdh/dotfiles/home/.vim/bundle/Command-T/ruby/command-t'
-let g:netrw_dirhist_5='/Users/hungerandthirst/Code/Projects/crunchy/crunch'
-let g:netrw_dirhist_6='/Users/hungerandthirst/Code/Projects/crunchy/screenshare/ScreenShareOSXClient'
-let g:netrw_dirhist_7='/Users/hungerandthirst/Code/Projects/crunchy/screenshare/ScreenShareOSXClient/ScreenShareClient'
-let g:netrw_dirhist_8='/Users/hungerandthirst/Code/Projects/crunchy/crunch'
-let g:netrw_dirhist_9='/Users/hungerandthirst/.ssh'
+let g:netrw_dirhist_cnt =0

0 comments on commit b6e8a02

Please sign in to comment.