Files
Saloni GuptaandIvan Pozdeev 7c877e06a0 Harden source scripts with set -euo pipefail and set -f (#3581)
Only use -f whenever there's an unquoted word split where globbing is undesired

---------

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2026-10-13 20:20:36 +03:00

23 lines
403 B
Bash
Executable File

#!/usr/bin/env bash
# Summary: List existing pyenv shims
# Usage: pyenv shims [--short]
set -euo pipefail
[ -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