Completions for global, local, prefix, shell

This commit is contained in:
Sam Stephenson 2011-09-13 12:38:34 -05:00
parent 43520db389
commit f1ca8906c0
4 changed files with 18 additions and 1 deletions

View file

@ -2,6 +2,12 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo system
exec rbenv-versions --bare
fi
RBENV_VERSION="$1"
RBENV_VERSION_FILE="${RBENV_ROOT}/global"

View file

@ -4,7 +4,6 @@ set -e
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
shift
echo system --unset
exec rbenv-versions --bare
fi

View file

@ -2,6 +2,12 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo system
exec rbenv-versions --bare
fi
if [ -n "$1" ]; then
export RBENV_VERSION="$1"
elif [ -z "$RBENV_VERSION" ]; then

View file

@ -2,6 +2,12 @@
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo system --unset
exec rbenv-versions --bare
fi
version="$1"
if [ -z "$version" ]; then