add wsl ssh agent support
parent
bc2a758c95
commit
151f134703
10
.zshrc
10
.zshrc
|
@ -116,4 +116,14 @@ if command -v zoxide > /dev/null ; then
|
|||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
if [[ "$(uname -r)" =~ "microsoft" ]] ; then
|
||||
if [ -z "$(pgrep ssh-agent)" ]; then
|
||||
rm -rf /tmp/ssh-*
|
||||
eval $(ssh-agent -s) > /dev/null
|
||||
else
|
||||
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
||||
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name "agent.*")
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -f "$HOME/.zshrc.local" ] && source "$HOME/.zshrc.local"
|
||||
|
|
Loading…
Reference in New Issue