Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sorin-ionescu/prezto into…
Browse files Browse the repository at this point in the history
… HEAD

* 'master' of https://github.com/sorin-ionescu/prezto:
  [Fix sorin-ionescu#479] Start only one ssh-agent instance
  [Fix sorin-ionescu#477] Add instructions for updating Prezto
  • Loading branch information
admk committed Oct 24, 2013
2 parents ce6a850 + a4bacb8 commit e75d4bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ If you are not able to find certain commands after switching to *Prezto*,
modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal
window or tab.

Updating
--------

Pull the latest changes and update submodules.

git pull && git submodule update --init --recursive

Usage
-----

Expand Down
7 changes: 5 additions & 2 deletions modules/ssh/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ _ssh_agent_sock="$TMPDIR/ssh-agent.sock"

# Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
else
# Export environment variables.
source "$_ssh_agent_env" 2> /dev/null

# Start ssh-agent if not started.
if ! ps -U "$USER" -o pid,ucomm | grep -q "${SSH_AGENT_PID} ssh-agent"; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi
fi

# Create a persistent SSH authentication socket.
Expand Down

0 comments on commit e75d4bb

Please sign in to comment.