zsh:zprofile: Only start one ssh-agent per session
Also check if ssh-agent is available before launching.
This commit is contained in:
@@ -46,7 +46,9 @@ fi
|
||||
[[ ! -e "$XDG_CONFIG_HOME/locale.conf" ]] || . "$XDG_CONFIG_HOME/locale.conf"
|
||||
|
||||
# SSH
|
||||
eval "$(ssh-agent)" >/dev/null
|
||||
if (( $+commands[ssh-agent] )) && [[ ! $SSH_AGENT_PID ]]; then
|
||||
eval "$(ssh-agent)" >/dev/null
|
||||
fi
|
||||
|
||||
# Editor
|
||||
if (( $+commands[nvim] )); then
|
||||
|
||||
Reference in New Issue
Block a user