From 3d1b788d8ad3b4c407d3c752de15318cf57cf03e Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Tue, 8 Nov 2011 12:24:14 -0800 Subject: [PATCH 1/2] Fixing the rvm_prompt_info command, now it will not show empty parens if no rvm is currently being used --- lib/rvm.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rvm.zsh b/lib/rvm.zsh index 597be1b3..dbfaf879 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -1,6 +1,10 @@ # get the name of the branch we are on function rvm_prompt_info() { ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return + if [ -z $ruby_version ] + then + return + fi echo "($ruby_version)" } From a7fb6680789c0a45c23539f9cce623a920ae143e Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Wed, 26 Sep 2012 13:57:38 -0700 Subject: [PATCH 2/2] Make rvm prompt function a bit cleaner --- lib/rvm.zsh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/rvm.zsh b/lib/rvm.zsh index dbfaf879..cb870a9b 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -1,11 +1,5 @@ # get the name of the branch we are on function rvm_prompt_info() { ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return - if [ -z $ruby_version ] - then - return - fi - echo "($ruby_version)" + [[ ! -z $ruby_version ]] && echo "($ruby_version)" } - -