revans/bash-it — pull request #186 by hmans (2013-01-29 17:50:21+00:00)
Title: [Discussion] Simplify & consolidate Ruby version reporting.

I'm trying to simplify the way bash-it prompts report the current version of Ruby. The problem was that there's a multitude of Ruby environment managers out there, each of which reports the currently activated Ruby differently, resulting in code that, well, [isn't all that great](https://github.com/revans/bash-it/blob/master/themes/base.theme.bash#L115-L137).

I'm trying to figure out a way to simplify this. My current approach is a simple one: instead of sourcing the current Ruby version from an environment variable or similar, **I just run `ruby -v` as part of the prompt**. This isn't mean to be final (thinking of performance considerations etc.), but I'd still be happy to hear some feedback and suggestions.

* Just how bad is this idea, really?
* Will it work with RVM and rbenv? (I've successfully tested chruby and rbfu, the latter of which I'm the maintainer of.)
* How can we make this optional? Not everybody is that interested in having the current Ruby version reported as part of the prompt.

Thanks,
Hendrik