25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
380 B

  1. #!/usr/bin/env bash
  2. # Summary: List existing pyenv shims
  3. # Usage: pyenv shims [--short]
  4. set -e
  5. [ -n "$PYENV_DEBUG" ] && set -x
  6. # Provide pyenv completions
  7. if [ "$1" = "--complete" ]; then
  8. echo --short
  9. exit
  10. fi
  11. shopt -s nullglob
  12. for command in "${PYENV_ROOT}/shims/"*; do
  13. if [ "$1" = "--short" ]; then
  14. echo "${command##*/}"
  15. else
  16. echo "$command"
  17. fi
  18. done | sort