pyenv/libexec/pyenv-shims
Casey McGinty 83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00

21 lines
360 B
Text
Executable file

# Summary: List existing pyenv shims
# Usage: pyenv shims [--short]
set -e
[ -n "$PYENV_DEBUG" ] && set -x
# Provide pyenv completions
if [ "$1" = "--complete" ]; then
echo --short
exit
fi
shopt -s nullglob
for command in "${PYENV_ROOT}/shims/"*; do
if [ "$1" = "--short" ]; then
echo "${command##*/}"
else
echo "$command"
fi
done | sort