MichaelAquilina / zsh-autoswitch-virtualenv

🐍 ZSH plugin to automatically switch python virtualenvs (including pipenv and poetry) as you move between directories
GNU General Public License v3.0
507 stars 80 forks source link

If AUTOSWITCH_FILE is not a file but a virtualenv, activate it #168

Closed afeblot closed 2 years ago

afeblot commented 2 years ago

Implement proposal https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv/issues/140#issuecomment-685901973. This is just the code change, let's see how you feel about this before looking at doc and tests.

afeblot commented 2 years ago

@MichaelAquilina , please let me know which version of the added test_check_venv.zunit test you want me to keep. The second one looks cleaner but takes longer, as it creates a virtualenv.

afeblot commented 2 years ago

Before merging, one of these 2 tests should be removed, as they test the same thing. Was just asking you which one you want to keep:

MichaelAquilina commented 2 years ago

Fixes #140

MichaelAquilina commented 2 years ago

@afeblot would you mind uploading your GPG public key to Github so that we can get rid of the unverified tag in your commits?

MichaelAquilina commented 2 years ago

@afeblot please keep the second one :) While it takes longer, it looks more likely to catch future regressions which is what is important.

MichaelAquilina commented 2 years ago

@afeblot please make sure to squash commits once you are done. Once everything is ready I'll go ahead and merge this PR. Thanks for your contribution!

afeblot commented 2 years ago

@MichaelAquilina, all done, ready for merge.

MichaelAquilina commented 2 years ago

https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv/commit/dddac00ed1d5a0586607cf3ea18f8935ad997740