25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

20 satır
503 B

  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. exitcode=0
  10. OLDIFS="$IFS"
  11. IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name)) || exitcode=$?
  12. IFS="$OLDIFS"
  13. for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
  14. echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
  15. done
  16. exit $exitcode