From 6fa81ef28d358e34f56b4c60fd7444d097e76e3f Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Sun, 11 Sep 2011 10:16:22 -0500 Subject: [PATCH] Add `rbenv local --unset` --- libexec/rbenv-local | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rbenv-local b/libexec/rbenv-local index 010e93b3..8b08a429 100755 --- a/libexec/rbenv-local +++ b/libexec/rbenv-local @@ -4,7 +4,9 @@ set -e RBENV_VERSION="$1" RBENV_VERSION_FILE=".rbenv-version" -if [ -n "$RBENV_VERSION" ]; then +if [ "$RBENV_VERSION" = "--unset" ]; then + rm -f "$RBENV_VERSION_FILE" +elif [ -n "$RBENV_VERSION" ]; then rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION" else rbenv-version-file-read "$RBENV_VERSION_FILE" ||