mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 18:31:59 +00:00
fix(ssh-agent): don't start new agent if screen/tmux symlink exists (#12297)
This commit is contained in:
parent
d157fc60c9
commit
3e05befaee
1 changed files with 4 additions and 2 deletions
|
@ -98,8 +98,10 @@ function _add_identities() {
|
||||||
|
|
||||||
# Add a nifty symlink for screen/tmux if agent forwarding is enabled
|
# Add a nifty symlink for screen/tmux if agent forwarding is enabled
|
||||||
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
||||||
&& [[ -n "$SSH_AUTH_SOCK" && ! -L "$SSH_AUTH_SOCK" ]]; then
|
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||||
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
_start_agent
|
_start_agent
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue