From 60e0ce4bb1fa11c8fc241f62b1a44b48c33e0cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 23 Jan 2025 19:51:55 +0100 Subject: [PATCH] docs(python): improve docs for settings --- plugins/python/README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/plugins/python/README.md b/plugins/python/README.md index fdd2b7979..490cf88f1 100644 --- a/plugins/python/README.md +++ b/plugins/python/README.md @@ -41,7 +41,28 @@ virtual environments: ### Settings You can set these variables in your `.zshrc` file, before Oh My Zsh is sourced. +For example: -- `$PYTHON_VENV_NAME`: preferred name for virtual environments (default: `venv`). +```sh +PYTHON_VENV_NAME=".venv" +PYTHON_VENV_NAMES=($PYTHON_VENV_NAME venv) +... +plugins=(... python) +source "$ZSH/oh-my-zsh.sh" +``` + + +## `$PYTHON_VENV_NAME` + +**Default**: `venv`. + +Preferred name for virtual environments, for example when creating via `mkv`. + +## `$PYTHON_VENV_NAMES` + +**Default**: `$PYTHON_VENV_NAME venv .venv`. + +Array of virtual environment names to be checked, in order, by `vrun` and `auto_vrun`. +This means these functions will load the first existing virtual environment in this list. +Duplicate names are ignored. -- `$PYTHON_VENV_NAMES`: list of virtual environment names to be checked, in order, by `vrun` and `auto_vrun`.