mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Merge branch 'theme-ryanneufeld' of git://github.com/ryanneufeld/oh-my-zsh into theme-ryanneufeld
This commit is contained in:
commit
d1837b60b7
1 changed files with 2 additions and 22 deletions
|
|
@ -1,26 +1,6 @@
|
|||
svn_prompt_status() {
|
||||
[ -d "./.svn" ] || return
|
||||
|
||||
base_dir="."
|
||||
while [ -d "$base_dir/.svn" ]; do base_dir="$base_dir/.."; done
|
||||
base_dir=$(stat -F "$base_dir")
|
||||
|
||||
rev=$(svn info ${base_dir} | awk '/^URL/ { sub(".*/","",$0); r=$0 } /^Revision/ { sub("[^0-9]*","",$0); print r"/"$0 }')
|
||||
echo "{" ${rev} "}"
|
||||
}
|
||||
|
||||
rvm_prompt_status() {
|
||||
if [ -f "$(which rvm-prompt)" ]; then
|
||||
if [ "" -ne "$(rvm-prompt i v g)" ]; then
|
||||
echo "<"$(rvm-prompt i v g)">"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm='%{$fg[green]%}$(rvm_prompt_status)%{$reset_color%}'
|
||||
local svn='%{$fg[green]%}$(svn_prompt_status)%{$reset_color%}'
|
||||
local svn='%{$fg[green]%}$(svn_prompt_info):$(svn_get_rev_nr)%{$reset_color%}'
|
||||
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
|
|
@ -37,5 +17,5 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═ "
|
|||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭ "
|
||||
|
||||
PROMPT="${user} ${pwd}$ "
|
||||
RPROMPT="${return_code} ${git_branch} ${svn} ${rvm}"
|
||||
RPROMPT="${return_code} ${git_branch} ${svn}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue