diff options
author | Nate McCurdy <nate.mccurdy@puppetlabs.com> | 2016-02-13 01:09:04 +0300 |
---|---|---|
committer | NateMcCurdy <nate.mccurdy@puppetlabs.com> | 2016-02-20 01:56:09 +0300 |
commit | 01bdee42a21b797d2d7e0b0c032d30e23e1499c9 (patch) | |
tree | 64621fb23fd236359ec30600c967bc26d816c0db /README.md | |
parent | 2d196fa12ffcd579ea310ad676aac9af51e360b2 (diff) |
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
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -245,6 +245,15 @@ specify the correct network interface by setting: |----------|---------------|-------------| |`POWERLEVEL9K_IP_INTERFACE`|None|The NIC for which you wish to display the IP address. Example: `eth0`.| +##### rbenv + +This segment shows the version of Ruby being used when using `rbenv` to change your current Ruby stack. + +It figures out the version being used by taking the output of the `rbenv version-name` command. + +* If `rbenv` is not in $PATH, nothing will be shown. +* If the current Ruby version is the same as the global Ruby version, nothing will be shown. + ##### rspec_stats See [Unit Test Ratios](#unit-test-ratios), below. |