Files

22 lines
403 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2013-01-18 17:41:41 +09:00
# Summary: List existing pyenv shims
# Usage: pyenv shims [--short]
set -euo pipefail
[ -n "${PYENV_DEBUG:-}" ] && set -x
2012-08-31 15:23:41 +09:00
# Provide pyenv completions
if [ "${1:-}" = "--complete" ]; then
2012-08-31 15:23:41 +09:00
echo --short
exit
fi
2014-01-02 22:26:22 +09:00
shopt -s nullglob
2012-08-31 15:23:41 +09:00
for command in "${PYENV_ROOT}/shims/"*; do
if [ "${1:-}" = "--short" ]; then
2012-08-31 15:23:41 +09:00
echo "${command##*/}"
else
echo "$command"
fi
done | sort