mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-12 13:33:52 -05:00
18 lines
397 B
Bash
Executable File
18 lines
397 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Summary: Deactivate virtual environment
|
|
#
|
|
# Usage: pyenv deactivate
|
|
#
|
|
# Deactivate a Python virtual environment.
|
|
|
|
set -e
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
shell="$(basename "${PYENV_SHELL:-$SHELL}")"
|
|
case "$shell" in
|
|
fish ) echo "functions -q deactivate; and deactivate";;
|
|
* ) echo "declare -f deactivate 1>/dev/null 2>&1 && deactivate";;
|
|
esac
|
|
echo "pyenv shell --unset"
|