pyenv/libexec/rbenv-version

17 lines
441 B
Text
Raw Normal View History

#!/usr/bin/env bash
# Summary: Show the current Ruby version and its origin
#
2012-12-29 23:05:04 -05:00
# 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
2011-08-01 16:50:26 -04:00
RBENV_VERSION_ORIGIN="$(rbenv-version-origin)"
if [ -z "$RBENV_VERSION_ORIGIN" ]; then
echo "$(rbenv-version-name)"
else
echo "$(rbenv-version-name) (set by $RBENV_VERSION_ORIGIN)"
fi