
This reverts commit 070e1c859fb2584c3dbe0a6fbe58cbc80938654e, reversing changes made to 3faeda67bb33e07750d1a104271369a7384ca45c.
21 lines
503 B
Bash
Executable File
21 lines
503 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 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
|