You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 rivejä
461 B

11 vuotta sitten
11 vuotta sitten
  1. #!/usr/bin/env bash
  2. # Summary: Show the current Python version and its origin
  3. #
  4. # Shows the currently selected Python version and how it was
  5. # selected. To obtain only the version string, use `pyenv
  6. # version-name'.
  7. set -e
  8. [ -n "$PYENV_DEBUG" ] && set -x
  9. OLDIFS="$IFS"
  10. IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
  11. IFS="$OLDIFS"
  12. for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
  13. echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
  14. done