mirror of
https://github.com/apisnetworks/pyenv.git
synced 2026-11-30 19:59:01 +00:00
Only use -f whenever there's an unquoted word split where globbing is undesired --------- Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
23 lines
403 B
Bash
Executable File
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
|