mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-20 06:03:35 +01:00
Updated Python plugin: accepts multiple venv names
- Refined automatic virtual environment activation (`auto_vrun`):
- Enhanced support for dynamic activation of virtual environments from a list.
- Updated `vrun` function:
- Enabled activation of the first valid virtual environment from a list of potential names.
- Improved feedback with clear error messages when no valid environment is found.
- Enhanced `mkv` function:
- Added support for multiple potential virtual environment names using `PYTHON_VENV_NAME` as a list.
- Simplified path handling with explicit construction using `${PWD}`.
- Improved error messaging and direct activation of newly created environments.
- This is my first pull request ever so please let me know if there are any issues with the changes or request.
This commit is contained in:
@@ -36,4 +36,5 @@ virtual environments:
|
||||
- To enable the feature, set `export PYTHON_AUTO_VRUN=true` before sourcing oh-my-zsh.
|
||||
- Plugin activates first virtual environment in lexicographic order whose name begins with `<venv-name>`.
|
||||
The default virtual environment name is `venv`. To use a different name, set
|
||||
`export PYTHON_VENV_NAME=<venv-name>`. For example: `export PYTHON_VENV_NAME=".venv"`
|
||||
`export PYTHON_VENV_NAME=("<venv-name>" "venv-name2")`. For example:
|
||||
`export PYTHON_VENV_NAME=(".venv" "venv" ".env" "env")`
|
||||
|
||||
Reference in New Issue
Block a user