mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 21:38:32 +08:00
When Poetry is configured with virtualenvs.in-project = true, poetry env info --path returns "." instead of the full path. This causes the plugin to fail with "no such file or directory: ./bin/activate". Changes: - Handle case where poetry returns "." by converting to $PWD/.venv - Add safety check to ensure activate script exists before sourcing - Maintain backward compatibility with existing setups Fixes issue with in-project virtual environments used in monorepos and git worktrees. |
||
|---|---|---|
| .. | ||
| poetry-env.plugin.zsh | ||
| README.md | ||
Poetry Environment Plugin
This plugin automatically changes poetry environment when you cd into or out of the project directory. Note: Script looks for pyproject.toml file to determine poetry if its a poetry environment
To use it, add poetry-env to the plugins array in your zshrc file:
plugins=(... poetry-env)