Permalink
Browse files

auto-update SSH_AUTH_SOCK within running shells

  • Loading branch information...
1 parent 09b062c commit 7c914d68ea51a67fea3ca4e6379542fb38fc977a @anthonyrisinger committed Sep 5, 2013
Showing with 10 additions and 0 deletions.
  1. +2 −0 .../info/exclude
  2. +8 −0 .../self/data/profile/etc/bash/interactive
View
@@ -2,4 +2,6 @@
!/.../
/.../*
!/.../self/
+!/.../info/
!.git*
+/.gitconfig.local
@@ -202,6 +202,14 @@ case ${TERM} in
;;
esac
+# auto-update SSH_AUTH_SOCK within running shells
+PROMPT_COMMAND+='
+if [[ -n ${TMUX} && -n ${SSH_AUTH_SOCK} ]]; then
+ unset SSH_AUTH_SOCK
+ export $(tmux show-environment | grep ^SSH_AUTH_SOCK)
+fi
+'
+
use_color=false
# Set colorful PS1 only on colorful terminals.

0 comments on commit 7c914d6

Please sign in to comment.