Debian Codegraph @

libexec/pyenv-version

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 # Summary: Show the current Python version(s) and its origin
3 # Usage: pyenv version [--bare]
4 #
5 # --bare show just the version name. An alias to `pyenv version-name'
6
7 set -e
8 [scip-shell system . . `[`. -n "$PYENV_DEBUG" ] && set -x
9
10 exitcode=0
11 OLDIFS="$IFS"
12 IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name)) || exitcode=$?
13 IFS="$OLDIFS"
14
15 unset bare
16 for arg; do
17 case "$arg" in
18 --complete )
19 echoscip-shell system . . echo. --bare
20 exit ;;
21 --bare ) bare=1 ;;
22 * )
23 pyenv-help --usage version >&2
24 exit 1
25 ;;
26 esac
27 done
28 for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
29 if [[ -n $bare ]]; then
30 echoscip-shell system . . echo. "$PYENV_VERSION_NAME"
31 else
32 echoscip-shell system . . echo. "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"
33 fi
34 done
35
36 exit $exitcode