3
[ -n "$RBENV_DEBUG" ] && set -x
6
if [ "$1" = "-" ]; then
12
if [ -z "$shell" ]; then
13
shell="$(basename "$SHELL")"
17
$(type -p greadlink readlink | head -1) $1
24
while [ -n "$path" ]; do
26
local name="${path##*/}"
27
path="$(resolve_link "$name" || true)"
34
root="$(abs_dirname "$0")/.."
36
if [ -z "$print" ]; then
39
profile='~/.bash_profile'
45
profile='your profile'
49
{ echo "# Load rbenv automatically by adding"
50
echo "# the following to ${profile}:"
52
echo 'eval "$(rbenv init -)"'
59
mkdir -p "${RBENV_ROOT}/"{shims,versions}
61
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
65
echo "source \"$root/completions/rbenv.${shell}\""
69
echo 'rbenv rehash 2>/dev/null'
71
commands=(`rbenv commands --sh`)
76
if [ "\$#" -gt 0 ]; then
82
eval \`rbenv "sh-\$command" "\$@"\`;;
84
command rbenv "\$command" "\$@";;