mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-12 08:15:04 -05:00
a8ca63fcc0
* Update help docs to clarify multiple version(s) are allowed * Tweek version(s) help description
20 lines
509 B
Bash
Executable file
20 lines
509 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Summary: Show the current Python version(s) and its origin
|
|
#
|
|
# Shows the currently selected Python version(s) 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
|