-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement autoenv unload #30
Comments
Yeah, I've considered this for a while, but decided it's out of scope (for now). Thanks for the suggestions though, I'll definitely consider them in the future. |
I'll leave this issue open for discussion. |
I like the idea. |
+1 |
I'd love if I can put it in
|
+1. I do see how it qualifies as out of scope, but I'd use an add-on (or completely separate) tool for handling unloading, if it existed. |
Simple workaround: place this .env somewhere high in your directory tree (possibly in the root)
I am sure there are some horrible side effects I am not taking into consideration, but it works for me. <_< |
I do hope you change you mind about this issue, but cool project anyway. |
Awesome project. I would love to see this one feature added as well. |
FYI: smartcd supports this. |
+1 for the unload feature. |
+1 |
FYI: zsh-autoenv also supports this, either through a separate or the same file (where you can look at a variable to see which event it is). |
+1 |
2 similar comments
+1 |
+1 |
+1 |
+1 |
I would suggest documenting the workaround by @kazagistar above somewhere in README. It could be useful for many people |
+1 |
Hi, I'm running into the same issue and found the suggestion by @kazagistar to be very useful. Thanks. One minor issue of that snippet is it will always run whenever I enter the subfolders, which will unnecessarily deactivate and reactivate the env.
This will make sure the |
I recommend just using direnv for this functionality. |
Closed as this was implemented in v0.3.0. Sorry for the pings - I know this is an older thread. If you are still using autoenv, free make a new issue for bug reports / unexpected functionality. |
In general I use autoenv to automatically activate my Python virtualenvs. It works pretty nice, but I miss a feature to automatically deactivate the virtualenv. It should deactivate the virtualenv if I change the directory to a path that is not inside the path which enabled the virtualenv. For example:
Another approach is to define bash functions inside
.env
(likeautoenv_load
andautoenv_unload
) and call these functions instead of just sourcing.env
/.env-unload
.The text was updated successfully, but these errors were encountered: