Commit Graph
3 Commits
Author SHA1 Message Date
Nate McCurdy 01bdee42a2 Improve the rbenv prompt by using version-name
Prior to this, the rbenv prompt only showed something if the
$RBENV_VERSION environment variable was set. This was not a complete
solution because rbenv can be configured locally, per directory, with
dotfiles. When using dotfiles, the $RBENV_VERSION variables is not set.

This fixes the issue by taking the output of the `rbenv version-name`
command which shows the real rbenv version being used based on any of
the 4 ways to change rbenv as shown here:

https://github.com/rbenv/rbenv#choosing-the-ruby-version

If the current version of Ruby being used is the same as the global
Ruby, nothing is shown.

This commit also adds documentation to the README that describes the
prompt.

Fixes issue #215
2016-02-19 14:56:09 -08:00
NateMcCurdy 04e6172db1 Remove the leading whitespace from the left prompt. 2015-03-26 15:42:56 -07:00
NateMcCurdy 443c1dbc8f Add a prompt for rbenv ruby version 2015-03-26 15:39:27 -07:00