只需了解:
- 当进入目录,载入: .env
- 当离开目录,载入: .env.leave
当只使用 kennethreitz/autoenv, 先使用 git 方式安装了 autoenv 。
- .zshrc
source ~/.autoenv/activate.sh
export AUTOENV_ENABLE_LEAVE=true
- .env
. /home/appleshan/.local/share/virtualenvs/test_pipenv-iVWx5v4Q/bin/activate
- .env.leave
deactivate
只需了解:
- 当进入目录,载入: .autoenv.zsh
- 当离开目录,载入: .autoenv_leave.zsh
当只使用 Tarrasch/zsh-autoenv, 使用 git 方式安装了 zsh-autoenv 。
- .zshrc
source ~/.oh-my-zsh/custom/plugins/zsh-autoenv/autoenv.zsh
- .autoenv.zsh
echo "进入 pipenv.";
. /home/appleshan/.local/share/virtualenvs/test_pipenv-iVWx5v4Q/bin/activate
或者
echo "进入 pipenv.";
. ./.venv/bin/activate
- .autoenv_leave.zsh
deactivate
echo "离开了 pipenv.";