Completion for exec

This commit is contained in:
Sam Stephenson 2011-09-13 12:46:06 -05:00
parent f1ca8906c0
commit 4923838981

View file

@ -2,6 +2,14 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
for command in "${RBENV_ROOT}/shims/"*; do
echo "${command##*/}"
done
exit
fi
RBENV_COMMAND="$1"
if [ -z "$RBENV_COMMAND" ]; then
echo "usage: rbenv exec COMMAND [arg1 arg2...]" >&2