Browse Source

refactor(themes): use `ruby_prompt_info` everywhere

Marc Cornellà 2 years ago
parent
commit
e3bb6e685d
4 changed files with 6 additions and 6 deletions
  1. 1 1
      themes/aussiegeek.zsh-theme
  2. 2 2
      themes/josh.zsh-theme
  3. 1 1
      themes/murilasso.zsh-theme
  4. 2 2
      themes/simonoff.zsh-theme

+ 1 - 1
themes/aussiegeek.zsh-theme

@@ -1,5 +1,5 @@
 
-PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color
+PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(ruby_prompt_info)$fg_bold[blue] ]$reset_color
  $ '
 # git theming
 ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green]("

+ 2 - 2
themes/josh.zsh-theme

@@ -10,7 +10,7 @@ function josh_prompt {
   prompt=" "
 
   branch=$(git_current_branch)
-  ruby_version=$(rvm_prompt_info || rbenv_prompt_info)
+  ruby_version=$(ruby_prompt_info)
   path_size=${#PWD}
   branch_size=${#branch}
   ruby_size=${#ruby_version}
@@ -31,7 +31,7 @@ function josh_prompt {
     prompt=" $prompt"
   done
   
-  prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(git_current_branch)"
+  prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} $(git_current_branch)"
   
   echo $prompt
 }

+ 1 - 1
themes/murilasso.zsh-theme

@@ -1,7 +1,7 @@
 local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
 local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
 local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
-local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%}'
+local rvm_ruby='%{$fg[red]%}$(ruby_prompt_info)%{$reset_color%}'
 local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}'
 
 PROMPT="${user_host}:${current_dir} ${rvm_ruby}

+ 2 - 2
themes/simonoff.zsh-theme

@@ -68,7 +68,7 @@ ZSH_THEME_RUBY_PROMPT_SUFFIX="]"
 # Decide if we need to set titlebar text.
 case $TERM in
   xterm*|*rxvt*)
-    PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%M:%~ $(git_prompt_info) $(rvm_prompt_info) | ${COLUMNS}x${LINES} | %y\a%}'
+    PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%M:%~ $(git_prompt_info) $(ruby_prompt_info) | ${COLUMNS}x${LINES} | %y\a%}'
     ;;
   screen)
     PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
@@ -88,7 +88,7 @@ fi
 # Finally, the prompt.
 PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
 $PR_RED$PR_HBAR<\
-$PR_BLUE%(!.$PR_RED%SROOT%s.%n)$PR_GREEN@$PR_BLUE%M:$PR_GREEN%$PR_PWDLEN<...<%~$PR_CYAN$(git_prompt_info)$(rvm_prompt_info)\
+$PR_BLUE%(!.$PR_RED%SROOT%s.%n)$PR_GREEN@$PR_BLUE%M:$PR_GREEN%$PR_PWDLEN<...<%~$PR_CYAN$(git_prompt_info)$(ruby_prompt_info)\
 $PR_RED>$PR_HBAR${(e)PR_FILLBAR}\
 $PR_RED$PR_HBAR<\
 $PR_GREEN%l$PR_RED>$PR_HBAR\