Skip to content

Commit

Permalink
split rest of steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns committed Nov 13, 2015
1 parent 9d4a7d0 commit fd85698
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions bin/rbenv-sh-update
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,15 @@ shell="$(basename "${RBENV_SHELL:-$SHELL}")"


echo "command rbenv update $@;"


echo "if command test -t 1; then"
echo "printf \"\\e[1;32mReloading rbenv\\e[0m\\n\";"
echo " printf \"\\e[1;32mReloading rbenv\\e[0m\\n\";"
echo "else"
echo " printf \"reloading rbenv\\n\";"
echo "fi;"

case "$shell" in
fish )
cat <<EOF
. (rbenv init -|psub)
printf " \\033[1;32m|\\033[0m done\\n"
else
printf "reloading rbenv\\n"
. (rbenv init -|psub)
printf " | done\\n"
end
EOF
;;
* )
cat <<EOF
eval "\$(rbenv init -)";
printf " \\033[1;32m|\\033[0m done\\n";
else
printf "reloading rbenv\\n";
eval "\$(rbenv init -)";
printf " | done\\n";
fi
EOF
;;
fish ) echo ". (rbenv init -|psub)" ;;
* ) echo "eval \"\$(rbenv init -)\";" ;;
esac

0 comments on commit fd85698

Please sign in to comment.