From 69d596f56fbf1e18e8d70f9a8b20353b7bc29f1e Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 13 Sep 2011 12:48:49 -0500 Subject: [PATCH] Completion for commands --- libexec/rbenv-commands | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libexec/rbenv-commands b/libexec/rbenv-commands index 94fa249..a5d56cc 100755 --- a/libexec/rbenv-commands +++ b/libexec/rbenv-commands @@ -2,12 +2,16 @@ set -e [ -n "$RBENV_DEBUG" ] && set -x +# Provide rbenv completions +if [ "$1" = "--complete" ]; then + echo --sh --no-sh + exit +fi + if [ "$1" = "--sh" ]; then sh=1 shift -fi - -if [ "$1" = "--no-sh" ]; then +elif [ "$1" = "--no-sh" ]; then nosh=1 shift fi