Make this work for bash and rvm as well as zsh and rbenv.