Apple - How to set an iTerm2 startup command
Profiles -> General -> Command
Everytime you open a new tab your bash profile will be sourced.
Got it, there is an option added in the development branch of iTerm that adds a "Send text at start" option to the profile settings. This will eventually be added to a (more) stable version of iTerm.
In iTerm2, preferences>profiles>tab general
, there is an option in Command
called send text at start
that executes any command you put there after login.
In particular, I typically have
source ~/.virtualenvs/.../bin/activate
for profiles that use Python.