I want to activate virtualenvwrapper and start ssh-agent on start (so I can later add key using ssh-add)
Here is what I tried:
source /usr/bin/virtualenvwrapper.sh
exec /usr/bin/ssh-agent $SHELL
Obviously, this doesn't work, because exec will cancel the effect of the source command. So I'm stuck. Every other solution I'm finding on stack overflow seems to include exec in one form or another :(.
You should be able to do
instead
This will allow you to start ssh-agent without spawning a new shell. In a new shell, your
source
command will be out of scope, but in the current shell, it should still apply.