Automatically restore virtualenv in Terminal.app on macOS (zsh, bash)
kulakov.ilya at gmail.com
Thu Jan 12 20:20:49 EST 2017
Today I discovered that one can customize session restoration in Terminal.app
by defining the shell_session_save_user_state function.
Here is a script that restores active virtualenv, e.g. after you reboot your machine:
It's written for ZSH, but it's fairly simple to port it to bash: you don't even need plugin,
since session management is supported out of the box.
Here is a plugin for oh-my-zsh:
More information about the Python-list