Diff
1diff --git a/lib/prompt_info_functions.zsh b/lib/prompt_info_functions.zsh
2index 1d5c23e41815f2a51555f6fe84d63202fc5ed6e1..5069c4b21751257d07cbdbf574ad5e37bd9ca1c0 100644
3--- a/lib/prompt_info_functions.zsh
4+++ b/lib/prompt_info_functions.zsh
5@@ -10,9 +10,15 @@
6 # Dummy implementations that return false to prevent command_not_found
7 # errors with themes, that implement these functions
8 # Real implementations will be used when the respective plugins are loaded
9-function chruby_prompt_info hg_prompt_info pyenv_prompt_info \
10- rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \
11- virtualenv_prompt_info jenv_prompt_info {
12+function chruby_prompt_info \
13+ rbenv_prompt_info \
14+ hg_prompt_info \
15+ pyenv_prompt_info \
16+ svn_prompt_info \
17+ vi_mode_prompt_info \
18+ virtualenv_prompt_info \
19+ jenv_prompt_info \
20+{
21 return 1
22 }
23
24@@ -22,10 +28,13 @@ function rvm_prompt_info() {
25 [ -f $HOME/.rvm/bin/rvm-prompt ] || return 1
26 local rvm_prompt
27 rvm_prompt=$($HOME/.rvm/bin/rvm-prompt ${=ZSH_THEME_RVM_PROMPT_OPTIONS} 2>/dev/null)
28- [[ "${rvm_prompt}x" == "x" ]] && return 1
29- echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}"
30+ [[ -z "${rvm_prompt}" ]] && return 1
31+ echo "${ZSH_THEME_RUBY_PROMPT_PREFIX}${rvm_prompt}${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
32 }
33
34+ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
35+
36+
37 # use this to enable users to see their ruby version, no matter which
38 # version management system they use
39 function ruby_prompt_info() {
40diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh
41index 6b652827319ebea441ee89fd8a781c67d3a09796..5016d86caadc92ce3192400926bc1df7c0c7a773 100644
42--- a/lib/theme-and-appearance.zsh
43+++ b/lib/theme-and-appearance.zsh
44@@ -50,3 +50,5 @@ ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of th
45 ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
46 ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
47 ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
48+ZSH_THEME_RUBY_PROMPT_PREFIX="("
49+ZSH_THEME_RUBY_PROMPT_SUFFIX=")"
50diff --git a/themes/3den.zsh-theme b/themes/3den.zsh-theme
51index 1d2c7db7f182583189b42f71101a627c04d62c9d..ae3a8865951d6ab53313ff015c0ad9ecc283e79a 100644
52--- a/themes/3den.zsh-theme
53+++ b/themes/3den.zsh-theme
54@@ -1,4 +1,4 @@
55-PROMPT=$'%{$fg[white]%}$(~/.rvm/bin/rvm-prompt) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
56+PROMPT=$'%{$fg[white]%}$(ruby_prompt_info) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
57 %{$fg_bold[green]%}%n$%{$reset_color%} '
58
59 ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}("
60diff --git a/themes/alanpeabody.zsh-theme b/themes/alanpeabody.zsh-theme
61index 4a1b1b3861d7f70e7471ec94b2854182f47c0773..1de90e57bda10d39072d6c6cb55dc6743fe020b7 100644
62--- a/themes/alanpeabody.zsh-theme
63+++ b/themes/alanpeabody.zsh-theme
64@@ -1,17 +1,10 @@
65
66 local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
67 local pwd='%{$fg[blue]%}%~%{$reset_color%}'
68-local rvm=''
69-if which rvm-prompt &> /dev/null; then
70- rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
71-else
72- if which rbenv &> /dev/null; then
73- rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
74- fi
75-fi
76 local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
77 local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
78
79+ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
80 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
81 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
82 ZSH_THEME_GIT_PROMPT_DIRTY=""
83@@ -24,5 +17,8 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
84 ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
85 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
86
87+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}‹"
88+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
89+
90 PROMPT="${user} ${pwd}$ "
91-RPROMPT="${return_code} ${git_branch} ${rvm}"
92+RPROMPT="${return_code} ${git_branch} \$(ruby_prompt_info)"
93diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme
94index d3f15ace5329de6888ac4c5dd1dc08e1a1e6a839..3f7ec0bc5652aa1d096bd7fd04fa86f97eede98e 100644
95--- a/themes/amuse.zsh-theme
96+++ b/themes/amuse.zsh-theme
97@@ -1,17 +1,5 @@
98 # vim:ft=zsh ts=2 sw=2 sts=2
99
100-rvm_current() {
101- rvm current 2>/dev/null
102-}
103-
104-rbenv_version() {
105- rbenv version 2>/dev/null | awk '{print $1}'
106-}
107-
108-PROMPT='
109-%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
110-$ '
111-
112 # Must use Powerline font, for \uE0A0 to render.
113 ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 "
114 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
115@@ -19,11 +7,12 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
116 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
117 ZSH_THEME_GIT_PROMPT_CLEAN=""
118
119-if [ -e ~/.rvm/bin/rvm-prompt ]; then
120- RPROMPT='%{$fg_bold[red]%}‹$(rvm_current)›%{$reset_color%}'
121-else
122- if which rbenv &> /dev/null; then
123- RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
124- fi
125-fi
126+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg_bold[red]%}‹"
127+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
128+
129+PROMPT='
130+%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
131+$ '
132+
133+RPROMPT='$(ruby_prompt_info)'
134
135diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme
136index f7349242285f6042b3d34e04a33c8da972e77a96..d00f72f5dc05b9b02590c57fad120d44571daeb0 100644
137--- a/themes/bira.zsh-theme
138+++ b/themes/bira.zsh-theme
139@@ -1,7 +1,6 @@
140 # ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
141 local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
142
143-
144 if [[ $UID -eq 0 ]]; then
145 local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
146 local user_symbol='#'
147@@ -11,26 +10,23 @@ else
148 fi
149
150 local current_dir='%{$terminfo[bold]$fg[blue]%}%~ %{$reset_color%}'
151-local rvm_ruby=''
152-if which rvm-prompt &> /dev/null; then
153- rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)› %{$reset_color%}'
154-else
155- if which rbenv &> /dev/null; then
156- rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%}'
157- fi
158-fi
159 local git_branch='$(git_prompt_info)'
160+local rvm_ruby='$(ruby_prompt_info)'
161 local venv_prompt='$(virtualenv_prompt_info)'
162
163+ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
164+
165 PROMPT="╭─${venv_prompt}${user_host}${current_dir}${rvm_ruby}${git_branch}
166 ╰─%B${user_symbol}%b "
167-RPS1="%B${return_code}%b"
168+RPROMPT="%B${return_code}%b"
169
170 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
171 ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
172
173+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
174+ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
175+
176 ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
177 ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
178-
179 ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
180 ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
181diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
182index 2fc066381ca13d0a7f40f548bf957bdeedd0093f..8278661ab8b2c50dbc72e76f0fa4db9af0766a8e 100644
183--- a/themes/crunch.zsh-theme
184+++ b/themes/crunch.zsh-theme
185@@ -29,13 +29,9 @@ ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
186
187 # Our elements:
188 CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
189-if [ -e ~/.rvm/bin/rvm-prompt ]; then
190- CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
191-else
192- if which rbenv &> /dev/null; then
193- CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(rbenv version | sed -e 's/ (set.*$//' -e 's/^ruby-//')}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
194- fi
195-fi
196+ZSH_THEME_RUBY_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR"
197+ZSH_THEME_RUBY_PROMPT_SUFFIX="$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
198+CRUNCH_RVM_='$(ruby_prompt_info)'
199 CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
200 CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
201
202diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme
203index e9e86177b498fa09cdcb09e4c67d73bece5f8dde..d6c417fc3e0291675981cfb1cc2abba96be71278 100644
204--- a/themes/dallas.zsh-theme
205+++ b/themes/dallas.zsh-theme
206@@ -2,14 +2,6 @@
207
208 # Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
209 DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
210-# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
211-if [ -e ~/.rvm/bin/rvm-prompt ]; then
212- DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
213-else
214- if which rbenv &> /dev/null; then
215- DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
216- fi
217-fi
218 # Grab the current machine name: muscato
219 DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
220 # Grab the current filepath, use shortcuts: ~/Desktop
221@@ -28,5 +20,8 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
222 # Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
223 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
224
225+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[white]%}[%{$fg[magenta]%}"
226+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$fg[white]%}]%{$reset_color%}"
227+
228 # Put it all together!
229-PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
230+PROMPT="$DALLAS_CURRENT_TIME_\$(ruby_prompt_info)$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
231diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
232index 9caebc69ebac80eb5fab42f97ccc33e0a60e68cd..5679e9f3771bcf26585719b494db299c4a3bf6b8 100644
233--- a/themes/fino-time.zsh-theme
234+++ b/themes/fino-time.zsh-theme
235@@ -25,11 +25,7 @@ function box_name {
236 }
237
238
239-rvm_ruby=''
240-if type rvm-prompt &>/dev/null; then
241- rvm_ruby='using%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
242-fi
243-
244+local rvm_ruby='using%{$FG[243]%}$(ruby_prompt_info)'
245 local git_info='$(git_prompt_info)'
246
247
248@@ -40,3 +36,5 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
249 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
250 ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
251 ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
252+ZSH_THEME_RUBY_PROMPT_PREFIX="‹"
253+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
254diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
255index 28d6cc2ec541acd5c9e848f1d42aa4bb811ad836..1d8bb30e176529745fac190b7e21aa52a5939e5a 100644
256--- a/themes/fino.zsh-theme
257+++ b/themes/fino.zsh-theme
258@@ -20,15 +20,7 @@ function box_name {
259 [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
260 }
261
262-local ruby_env=''
263-if which rvm-prompt &> /dev/null; then
264- ruby_env='using%{$FG[243]%} ‹$(rvm-prompt i v g)›%{$reset_color%}'
265-else
266- if which rbenv &> /dev/null; then
267- ruby_env='using%{$FG[243]%} ‹$(rbenv version-name)›%{$reset_color%}'
268- fi
269-fi
270-
271+local ruby_env='using%{$FG[243]%} $(ruby_prompt_info)'
272 local git_info='$(git_prompt_info)'
273 local prompt_char='$(prompt_char)'
274
275@@ -40,3 +32,5 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
276 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
277 ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
278 ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
279+ZSH_THEME_RUBY_PROMPT_PREFIX="‹"
280+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
281diff --git a/themes/frontcube.zsh-theme b/themes/frontcube.zsh-theme
282index 539e744f87902bb51a4f31ce24bc59411fdcbed8..f9488d0ac540a73310710ee54e8be3be18240936 100644
283--- a/themes/frontcube.zsh-theme
284+++ b/themes/frontcube.zsh-theme
285@@ -1,12 +1,13 @@
286-local rvm="%{$fg[green]%}[$(rvm-prompt i v g)]%{$reset_color%}"
287
288 PROMPT='
289 %{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%}
290 %{$fg[green]%}➞ %{$reset_color%'
291
292-RPROMPT='$(git_prompt_info) ${rvm}'
293+RPROMPT='$(git_prompt_info) $(ruby_prompt_info)'
294
295 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:"
296 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
297 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✖ %{$reset_color%}"
298 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] %{$fg[green]%}✔%{$reset_color%}"
299+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}["
300+ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
301diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
302index 515325e3820bcec513b53cea382dbe99c138cd68..e6c2d81426d287ede3e827a4d82f8d752c84d5ee 100644
303--- a/themes/gallois.zsh-theme
304+++ b/themes/gallois.zsh-theme
305@@ -14,8 +14,8 @@ git_custom_status() {
306 }
307
308 # RVM component of prompt
309-ZSH_THEME_RVM_PROMPT_PREFIX="%{$fg[red]%}["
310-ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}"
311+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}["
312+ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
313
314 # Combine it all into a final right-side prompt
315 RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1'
316diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
317index c763ef3c661e000a9417bd4e3d81bf529d9bf58d..1e6c4e93b63d76b4210da56332764efc095c3665 100644
318--- a/themes/gnzh.zsh-theme
319+++ b/themes/gnzh.zsh-theme
320@@ -29,21 +29,15 @@ local return_code="%(?..%F{red}%? ↵%f)"
321
322 local user_host="${PR_USER}%F{cyan}@${PR_HOST}"
323 local current_dir="%B%F{blue}%~%f%b"
324-local rvm_ruby=''
325-if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect user-local rvm installation
326- rvm_ruby='%F{red}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%f'
327-elif which rvm-prompt &> /dev/null; then # detect system-wide rvm installation
328- rvm_ruby='%F{red}‹$(rvm-prompt i v g s)›%f'
329-elif which rbenv &> /dev/null; then # detect Simple Ruby Version Management
330- rvm_ruby='%F{red}‹$(rbenv version | sed -e "s/ (set.*$//")›%f'
331-fi
332 local git_branch='$(git_prompt_info)'
333
334-PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
335+PROMPT="╭─${user_host} ${current_dir} \$(ruby_prompt_info) ${git_branch}
336 ╰─$PR_PROMPT "
337 RPROMPT="${return_code}"
338
339 ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹"
340 ZSH_THEME_GIT_PROMPT_SUFFIX="› %f"
341+ZSH_THEME_RUBY_PROMPT_PREFIX="%F{red}‹"
342+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%f"
343
344 }
345diff --git a/themes/itchy.zsh-theme b/themes/itchy.zsh-theme
346index e1f2d56e28029cfddc02bc7d2d44a62bbb0ed1f4..41a42e88cc02d5b79b561ef0202d5333080688ff 100644
347--- a/themes/itchy.zsh-theme
348+++ b/themes/itchy.zsh-theme
349@@ -7,10 +7,12 @@ local pwd="%{$fg[yellow]%}%~%{$reset_color%}"
350 PROMPT='${user}${host} ${pwd}
351 ${smiley} '
352
353-RPROMPT='$(rvm-prompt || rbenv version) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}'
354+RPROMPT='$(ruby_prompt_info) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}'
355
356 ZSH_THEME_GIT_PROMPT_PREFIX=""
357 ZSH_THEME_GIT_PROMPT_SUFFIX=""
358 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗%{$reset_color%}"
359 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔%{$reset_color%}"
360
361+ZSH_THEME_RUBY_PROMPT_PREFIX=""
362+ZSH_THEME_RUBY_PROMPT_SUFFIX=""
363diff --git a/themes/jaischeema.zsh-theme b/themes/jaischeema.zsh-theme
364index da1dd1e5dca6cbfb2b14da6d52e022df5284b94a..50d2bc4a56f14dbb7f56e2117728f715bbd4933b 100644
365--- a/themes/jaischeema.zsh-theme
366+++ b/themes/jaischeema.zsh-theme
367@@ -1,16 +1,12 @@
368 # jaischeema.zsh-theme
369
370 PROMPT='%{$fg_bold[magenta]%}%m%{$reset_color%} at %{$fg_bold[green]%}%~%{$reset_color%} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}%{$fg[red]%}❯%{$reset_color%} '
371+RPROMPT='$(ruby_prompt_info)'
372
373 ZSH_THEME_GIT_PROMPT_PREFIX="±(%{$fg[red]%}"
374 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
375 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%} "
376 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) "
377
378-if which rbenv &> /dev/null; then
379- RPROMPT='%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%}'
380-else
381- if which rvm-prompt &> /dev/null; then
382- RPROMPT='%{$fg[red]%}$(rvm-prompt)%{$reset_color%}'
383- fi
384-fi
385+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}"
386+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
387diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme
388deleted file mode 100644
389index abda6232ccdb20035fbe8f62cfe1287cc70a2349..0000000000000000000000000000000000000000
390--- a/themes/macovsky-ruby.zsh-theme
391+++ /dev/null
392@@ -1,15 +0,0 @@
393-# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
394-local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
395-
396-if [ -e ~/.rvm/bin/rvm-prompt ]; then
397- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
398-else
399- if which rbenv &> /dev/null; then
400- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
401- fi
402-fi
403-
404-RPS1="${return_code}"
405-
406-ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
407-ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
408diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme
409new file mode 120000
410index 0000000000000000000000000000000000000000..d3ee200a99637eba556cd37b0582619c55070855
411--- /dev/null
412+++ b/themes/macovsky-ruby.zsh-theme
413@@ -0,0 +1 @@
414+macovsky.zsh-theme
415diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme
416index d3f7d16b4ae0cc9e423a847202d3f5de25b3016c..f527e5861245d32454768dc7767bd36984548566 100644
417--- a/themes/macovsky.zsh-theme
418+++ b/themes/macovsky.zsh-theme
419@@ -1,14 +1,12 @@
420 # ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
421 local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
422
423-if [ -e ~/.rvm/bin/rvm-prompt ]; then
424- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
425-else
426- if which rbenv &> /dev/null; then
427- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
428- fi
429-fi
430-RPS1="${return_code}"
431+PROMPT='%{$fg[green]%}%~%{$reset_color%} $(ruby_prompt_info) $(git_prompt_info)%{$reset_color%}%B$%b '
432+RPROMPT="${return_code}"
433
434 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
435 ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
436+
437+
438+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
439+ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
440diff --git a/themes/mira.zsh-theme b/themes/mira.zsh-theme
441index e6c952998657ab64b402ed085913ab654a5e7485..a7c60359ca39c1e1f183ab7c0830076e0efa2cc3 100644
442--- a/themes/mira.zsh-theme
443+++ b/themes/mira.zsh-theme
444@@ -4,22 +4,13 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
445 local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
446 local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
447
448-local rvm_ruby=''
449-if which rvm-prompt &> /dev/null; then
450- rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
451-else
452- if which rbenv &> /dev/null; then
453- rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
454- fi
455-fi
456+local nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
457
458-local nvm_node=''
459-nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
460+local jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
461
462-local jenv_java=''
463-jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
464+local git_branch='$(git_prompt_info)'
465
466-local git_branch='$(git_prompt_info)%{$reset_color%}'
467+local rvm_ruby='$(ruby_prompt_info)'
468
469 PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
470 ╰─%B$%b "
471@@ -27,3 +18,6 @@ RPS1="${return_code}"
472
473 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
474 ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
475+
476+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
477+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
478diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme
479index 63ce4261bf61348a01c3cdb2526b638c563f3602..ef91c5ee3bcad13064bcecb6d5862ecac214e64c 100644
480--- a/themes/simonoff.zsh-theme
481+++ b/themes/simonoff.zsh-theme
482@@ -23,7 +23,7 @@ function precmd {
483 local promptsize=${#${(%):---(%n@%M:%l)---()}}
484 local pwdsize=${#${(%):-%~}}
485 local gitbranch="$(git_prompt_info)"
486- local rvmprompt="$(rvm_prompt_info)"
487+ local rvmprompt="$(ruby_prompt_info)"
488 local gitbranchsize=${#${gitbranch:-''}}
489 local rvmpromptsize=${#${rvmprompt:-''}}
490
491@@ -90,8 +90,8 @@ setprompt () {
492 ZSH_THEME_GIT_PROMPT_SUFFIX="]"
493 ###
494 # Modify RVM prompt
495- ZSH_THEME_RVM_PROMPT_PREFIX=" ["
496- ZSH_THEME_RVM_PROMPT_SUFFIX="]"
497+ ZSH_THEME_RUBY_PROMPT_PREFIX=" ["
498+ ZSH_THEME_RUBY_PROMPT_SUFFIX="]"
499
500
501 ###
502diff --git a/themes/suvash.zsh-theme b/themes/suvash.zsh-theme
503index 1680973dfd8729a111b5f92cbc09c4a3e07e87e5..850476cdf1786e16b1854588ab7b67e7fbd43846 100644
504--- a/themes/suvash.zsh-theme
505+++ b/themes/suvash.zsh-theme
506@@ -8,20 +8,7 @@ function virtualenv_info {
507 [[ -n "$VIRTUAL_ENV" ]] && echo '('${VIRTUAL_ENV:t}') '
508 }
509
510-function ruby_prompt {
511- if (( $+commands[rvm-prompt] )); then
512- print -n $ZSH_THEME_RUBY_PROMPT_PREFIX
513- print -n $(~/.rvm/bin/rvm-prompt)
514- print -n $ZSH_THEME_RUBY_PROMPT_SUFFIX
515- elif (( $+commands[rbenv] )); then
516- print -n $ZSH_THEME_RUBY_PROMPT_PREFIX
517- print -n $(rbenv version | sed -e "s/ (set.*$//")
518- print -n $ZSH_THEME_RUBY_PROMPT_SUFFIX
519- fi
520- return 0
521-}
522-
523-PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)$(ruby_prompt)
524+PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)$(ruby_prompt_info)
525 $(virtualenv_info) $(prompt_char) '
526
527 ZSH_THEME_GIT_PROMPT_PREFIX=' on %F{magenta}'
528diff --git a/themes/wedisagree.zsh-theme b/themes/wedisagree.zsh-theme
529index 9bdbce40dfddc7137214208c145b4090cdca2e90..07006ecd9574d465c12cc739cc11618da7ef6a47 100644
530--- a/themes/wedisagree.zsh-theme
531+++ b/themes/wedisagree.zsh-theme
532@@ -28,7 +28,7 @@ PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
533 RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}$(git_prompt_ahead)%{$reset_color%}'
534
535 # Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name
536-# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
537+# $(ruby_prompt_info)
538
539 # local time, color coded by last return code
540 time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
541@@ -48,6 +48,9 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➜" # ⓡ ⑄
542 ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊
543 ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%} 𝝙"
544
545+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[yellow]%}"
546+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
547+
548 # More symbols to choose from:
549 # ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
550 # ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠