143cc8f90158f39d8630f26e9b0865502a467c61

Author
Nick Diego Yamane <nick@diegoyam.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Fix rvm-prompt usage in fino* themes (#6477)

* theme/fino: Check rvm-prompt is installed before to try to use it

Signed-off-by: Nick Diego Yamane <nick.diego@gmail.com>

* theme/fino-time: Check rvm-prompt is installed before to try to use it

Signed-off-by: Nick Diego Yamane <nick.diego@gmail.com>

Diff

This diff is truncated to protect this page.

 1diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
 2index 9b1db3a086dc6cd424e7625a419489662fef229a..c1a48d02a7b0a62aee9759eb20da70de033fec11 100644
 3--- a/themes/fino-time.zsh-theme
 4+++ b/themes/fino-time.zsh-theme
 5@@ -25,12 +25,16 @@ function box_name {
 6 }
 7 
 8 
 9-local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}'
10+rvm_ruby=''
11+if type rvm-prompt &>/dev/null; then
12+    rvm_ruby='using%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
13+fi
14+
15 local current_dir='${PWD/#$HOME/~}'
16 local git_info='$(git_prompt_info)'
17 
18 
19diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
20index 6eec097f5a72aa4319fdf6f92c8bc04035bc213f..71ed6bbbc86e059bcd0f572c3692344d145b0672 100644
21--- a/themes/fino.zsh-theme
22+++ b/themes/fino.zsh-theme
23@@ -22,10 +22,10 @@ function box_name {
24 
25 local ruby_env=''
26 if which rvm-prompt &> /dev/null; then
27-  ruby_env=' ‹$(rvm-prompt i v g)›%{$reset_color%}'
28+  ruby_env='using%{$FG[243]%} ‹$(rvm-prompt i v g)›%{$reset_color%}'
29 else
30   if which rbenv &> /dev/null; then
31-    ruby_env=' ‹$(rbenv version-name)›%{$reset_color%}'
32+    ruby_env='using%{$FG[243]%} ‹$(rbenv version-name)›%{$reset_color%}'
33   fi
34 fi
35 
36@@ -34,7 +34,7 @@ local git_info='$(git_prompt_info)'
37 local prompt_char='$(prompt_char)'
38 
39