mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-10 02:09:51 +00:00
adding rbenv support to all the rvm themes
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$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 return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
@@ -19,4 +26,3 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
|
||||
PROMPT="${user} ${pwd}$ "
|
||||
RPROMPT="${return_code} ${git_branch} ${rvm}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user