From c030d1cf7c68a5bfea87eac9b80d295fb1ee57df Mon Sep 17 00:00:00 2001 From: "Leo.liang" Date: Fri, 16 Oct 2015 12:10:58 +1100 Subject: [PATCH] Replace rvm specific code to generic ruby_info --- themes/alanpeabody.zsh-theme | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/themes/alanpeabody.zsh-theme b/themes/alanpeabody.zsh-theme index 4a1b1b38..aa801a4c 100644 --- a/themes/alanpeabody.zsh-theme +++ b/themes/alanpeabody.zsh-theme @@ -1,14 +1,8 @@ local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}' local pwd='%{$fg[blue]%}%~%{$reset_color%}' -local rvm='' -if which rvm-prompt &> /dev/null; then - rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}' -else - if which rbenv &> /dev/null; then - rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' - fi -fi + +local ruby_info='%{$fg[green]%}‹$(ruby_prompt_info)›%{$reset_color%}' local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})' local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}' @@ -25,4 +19,4 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" PROMPT="${user} ${pwd}$ " -RPROMPT="${return_code} ${git_branch} ${rvm}" +RPROMPT="${return_code} ${git_branch} ${ruby_info}"