pyenv/libexec/pyenv-version

18 lines
461 B
Text
Raw Normal View History

#!/usr/bin/env bash
2013-01-18 08:41:41 +00:00
# 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
2013-08-15 13:29:14 +00:00
OLDIFS="$IFS"
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
2013-08-15 13:29:14 +00:00
IFS="$OLDIFS"
for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
done