Bash: add refresh_agent() function
Bash: add refresh_agent() function

This is a little helper function to make setting up SSH agents
a little easier.

When you first run the agent, or if you have a forwarded agent, you dump
the required environment settings in a file at ~/.ssh-agent. For
example, if you just run ssh-agent you'll get some output like:

  SSH_AUTH_SOCK=/tmp/ssh-E2CQJEkBOo/agent.26372; export SSH_AUTH_SOCK;
  SSH_AGENT_PID=26373; export SSH_AGENT_PID;
  echo Agent pid 26373;

So, you could redirect that (ie. "ssh-agent > ~/.ssh-agent") and then,
if you had to refresh your environment for any reason you could just
run:

  refresh_agent

Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>

wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent