update alanpeabody to use ruby_prompt_info instead of custom code
This commit is contained in:
parent
3d5b3430fd
commit
3b068d9e6a
@ -1,14 +1,8 @@
|
|||||||
|
|
||||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||||
local rvm=''
|
local ruby_info='%{$fg[green]%}‹$(ruby_prompt_info)›%{$reset_color%}'
|
||||||
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 return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$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]%} ✭"
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||||
|
|
||||||
PROMPT="${user} ${pwd}$ "
|
PROMPT="${user} ${pwd}$ "
|
||||||
RPROMPT="${return_code} ${git_branch} ${rvm}"
|
RPROMPT="${return_code} ${git_branch} ${ruby_info}"
|
||||||
|
Loading…
Reference in New Issue
Block a user