Fix ssh auth sock in tmux
This commit is contained in:
parent
75f345f83b
commit
72c155a7b8
2 changed files with 6 additions and 3 deletions
|
|
@ -20,3 +20,5 @@ helper = /opt/boxen/bin/boxen-git-credential
|
||||||
|
|
||||||
[hub]
|
[hub]
|
||||||
protocol = https
|
protocol = https
|
||||||
|
[gitreview]
|
||||||
|
username = hunner
|
||||||
|
|
|
||||||
7
.zshenv
7
.zshenv
|
|
@ -182,8 +182,9 @@ alias gvim="gvim -font 'APL385 Unicode 8' -c 'set keymap=uniapl385'"
|
||||||
alias n=nvim
|
alias n=nvim
|
||||||
|
|
||||||
## For forwarding ssh auth I think
|
## For forwarding ssh auth I think
|
||||||
if [ -n "$SSH_AUTH_SOCK" ] ; then
|
if [ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/.ssh-agent" ] ; then
|
||||||
ln -fs $SSH_AUTH_SOCK $HOME/.ssh-agent
|
ln -fs $SSH_AUTH_SOCK "$HOME/.ssh-agent"
|
||||||
|
export SSH_AUTH_SOCK="$HOME/.ssh-agent"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Add extra fonts
|
## Add extra fonts
|
||||||
|
|
@ -352,7 +353,7 @@ zpush() {
|
||||||
}
|
}
|
||||||
function r() {
|
function r() {
|
||||||
if [[ -n $TMUX ]]; then
|
if [[ -n $TMUX ]]; then
|
||||||
NEW_SSH_AUTH_SOCK=`tmux showenv|grep ^SSH_AUTH_SOCK|cut -d = -f 2`
|
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
|
if [[ -n $NEW_SSH_AUTH_SOCK ]] && [[ -S $NEW_SSH_AUTH_SOCK ]]; then
|
||||||
SSH_AUTH_SOCK=$NEW_SSH_AUTH_SOCK
|
SSH_AUTH_SOCK=$NEW_SSH_AUTH_SOCK
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue