mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
83e5459cfb
All scripts in libexec/ (excluding pyenv) are called through pyenv, therefore the shebang lines are not necessary. On some systems this provides a measurable increase in performance of the shell prompt. Related to pyenv/pyenv-virtualenv#259
19 lines
483 B
Text
Executable file
19 lines
483 B
Text
Executable file
# Summary: Show the current Python version and its origin
|
|
#
|
|
# Shows the currently selected Python version and how it was
|
|
# selected. To obtain only the version string, use `pyenv
|
|
# version-name'.
|
|
|
|
set -e
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
exitcode=0
|
|
OLDIFS="$IFS"
|
|
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name)) || exitcode=$?
|
|
IFS="$OLDIFS"
|
|
|
|
for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
|
|
echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
|
|
done
|
|
|
|
exit $exitcode
|