b833e2971bcf05cb723c9a592862771209cba3e7
- Author
- Michael Aquilina <michaelaquilina@gmail.com>
- Committer
- Michael Aquilina <michaelaquilina@gmail.com>
- Date
Message
Fix regression that prevented new terminals from autoswitching
Diff
1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
2index 080003cea50c82b300b2687264fac40a252e4b67..cddc0361a371fc6212d9d6a2e0f3d6e22370ab7f 100644
3--- a/autoswitch_virtualenv.plugin.zsh
4+++ b/autoswitch_virtualenv.plugin.zsh
5@@ -133,3 +133,6 @@ function mkvenv()
6 autoload -Uz add-zsh-hook
7 add-zsh-hook -D chpwd _check_venv
8 add-zsh-hook chpwd _check_venv
9+
10+# Check if the starting directory contains a .venv
11+_check_venv