Skip to content

Commit

Permalink
Don't show ruby info if using system version
Browse files Browse the repository at this point in the history
  • Loading branch information
chauncey-garrett committed Sep 11, 2015
1 parent 226bb19 commit a8fe1b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ruby/functions/ruby-info
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ typeset -gA ruby_info
if (( $+commands[rvm-prompt] )); then
version="$(rvm-prompt)"
elif (( $+commands[rbenv] )); then
version="$(rbenv version-name)"
local rbenv_version="$(rbenv version-name)"
if [[ "$rbenv_version" == "system" ]]; then
version=""
else
version="$rbenv_version"
fi
elif (( $+commands[ruby] )); then
version="${${$(ruby --version)[(w)1,(w)2]}/ /-}"
fi
Expand Down

0 comments on commit a8fe1b3

Please sign in to comment.