#!/usr/bin/env bash # Summary: Show the current Ruby version and its origin # # Shows the currently selected Ruby version and how it was # selected. To obtain only the version string, use `rbenv # version-name'. set -e [ -n "$RBENV_DEBUG" ] && set -x RBENV_VERSION_FILE="$(rbenv-version-origin)" if [ -e "$RBENV_VERSION_FILE" ]; then echo "$(rbenv-version-name) (set by $RBENV_VERSION_FILE)" else echo "$(rbenv-version-name)" fi