This can be used to activate Python "virtual venv environments", but
is basically language agnostic.
--- /dev/null
+## venv
+
+Add support for Python "venv" virtual environments.
+
+### Command Aliases
+
+- `activate`: try to activate a Python "venv" in the current directory. Both the
+ path names `./bin/activate` as well as `./venv/bin/activate` are tried, and
+ the script found will be sourced (not executed).
--- /dev/null
+# AX-ZSH: Alex' Modular ZSH Configuration
+# venv.zshrc: Support Python "venv" virtual environments
+
+[[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 92
+
+function activate() {
+ for p (.venv/bin bin); do
+ activate="$PWD/$p/activate"
+ if [[ -r "$activate" ]]; then
+ source "$activate"
+ return 0
+ fi
+ done
+ echo "No virtual environment found in \"$PWD\"!"
+ return 1
+}