1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 20:13:47 -05:00
Files
pyenv/libexec/rbenv-commands
2011-09-12 10:11:59 -05:00

34 lines
602 B
Bash
Executable File

#!/usr/bin/env bash
set -e
[ -n "$RBENV_DEBUG" ] && set -x
if [ "$1" = "--sh" ]; then
sh=1
shift
fi
if [ "$1" = "--no-sh" ]; then
nosh=1
shift
fi
shopt -s nullglob
{ for path in ${PATH//:/$'\n'}; do
for command in "${path}/rbenv-"*; do
command="${command##*rbenv-}"
if [ -n "$sh" ]; then
if [ ${command:0:3} = "sh-" ]; then
echo ${command##sh-}
fi
elif [ -n "$nosh" ]; then
if [ ${command:0:3} != "sh-" ]; then
echo ${command##sh-}
fi
else
echo ${command##sh-}
fi
done
done
} | sort | uniq