mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
merge
This commit is contained in:
parent
a8c56f5231
commit
8274156fae
296 changed files with 6279 additions and 3141 deletions
|
|
@ -13,6 +13,11 @@ function _start_agent() {
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -d "$HOME/.ssh" ]]; then
|
||||
echo "[oh-my-zsh] ssh-agent plugin requires ~/.ssh directory"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Set a maximum lifetime for identities added to ssh-agent
|
||||
local lifetime
|
||||
zstyle -s :omz:plugins:ssh-agent lifetime lifetime
|
||||
|
|
@ -93,8 +98,10 @@ function _add_identities() {
|
|||
|
||||
# Add a nifty symlink for screen/tmux if agent forwarding is enabled
|
||||
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
||||
&& [[ -n "$SSH_AUTH_SOCK" && ! -L "$SSH_AUTH_SOCK" ]]; then
|
||||
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
||||
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
|
||||
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
||||
fi
|
||||
else
|
||||
_start_agent
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue