Browse files

Add alias to fix ssh_auth_sock in tmux

  • Loading branch information...
1 parent b698009 commit 04d13a90c4a0fdb50e8b05394d6ea3ffc9bdf40c @quiteliderally committed May 8, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 aliases/tmux
View
8 aliases/tmux
@@ -0,0 +1,8 @@
+function rssh() {
+ if [[ -n $TMUX ]]; then
+ NEW_SSH_AUTH_SOCK=`tmux showenv|grep ^SSH_AUTH_SOCK|cut -d = -f 2`
+ if [[ -n $NEW_SSH_AUTH_SOCK ]] && [[ -S $NEW_SSH_AUTH_SOCK ]]; then
+ SSH_AUTH_SOCK=$NEW_SSH_AUTH_SOCK
+ fi
+ fi
+}

0 comments on commit 04d13a9

Please sign in to comment.