From a8fe1b3cb42c2a44349fa373ade5b46d5b9a57ee Mon Sep 17 00:00:00 2001 From: Chauncey Garrett Date: Fri, 11 Sep 2015 12:24:04 -0500 Subject: [PATCH] Don't show ruby info if using system version --- modules/ruby/functions/ruby-info | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ruby/functions/ruby-info b/modules/ruby/functions/ruby-info index ebf0f7fe8d..84f0de90ac 100644 --- a/modules/ruby/functions/ruby-info +++ b/modules/ruby/functions/ruby-info @@ -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