mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-27 21:46:08 +02:00
feat(uv-env): add plugin for Astral's uv (#13914)
* feat(uv-env): create plugin This plugin automatically activates/deactivates a uv-managed virtual environment when you cd into or out of a project directory. It looks for pyproject.toml and uv.lock to detect a uv project, and reads UV_PROJECT_ENVIRONMENT to support custom venv locations. * fix(uv-env): address review feedback from robbyrussell - Add `local` to venv_dir to prevent leaking into user's shell - Replace `export` with `typeset -g` for uv_active and uv_dir - Use `autoload -Uz` to match the style guide
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# uv Environment Plugin
|
||||
|
||||
This plugin automatically activates the uv virtual environment when you cd into a project directory, and deactivates it when you cd out.
|
||||
Note: Script looks for pyproject.toml and uv.lock files to determine if it's a uv project
|
||||
|
||||
To use it, add `uv-env` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... uv-env)
|
||||
```
|
||||
Reference in New Issue
Block a user