ehartmann / zsh-poetry

🐚 Simple ZSH plugin for automatically activating and deactivating Poetry-created virtualenvs. 🐍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIT License ZSH 5.0.2+

zsh-poetry

Automatically activates virtual environments created by Poetry when changing to a project directory with a valid pyproject.toml.

Also patches poetry shell to work more reliably, especially in environments using pyenv. See sdispater/poetry#571 and sdispater/poetry#497 for more information.

Install

Download and source poetry.zsh.

Antigen

antigen bundle darvid/zsh-poetry

zplug

zplug "darvid/zsh-poetry"

Configuration

Options:

  • ZSH_POETRY_AUTO_ACTIVATE (default: 1): if set, automatically activates virtual environments in valid project directories when changing directories.
  • ZSH_POETRY_AUTO_DEACTIVATE (default: 1): if set, automatically deactivates virtual environments when moving out of project directories.
  • ZSH_POETRY_OVERRIDE_SHELL (default: 1): if set, replaces poetry shell with a call to activate the virtualenv directly, which circumvents Poetry's (currently) problematic behavior when trying to activate a shell in some environments.

About

🐚 Simple ZSH plugin for automatically activating and deactivating Poetry-created virtualenvs. 🐍

License:MIT License


Languages

Language:Shell 100.0%