Change all the themes to use the new git plugin and rm the old git plugin code.

This commit is contained in:
Ashley Dev 2011-07-06 18:58:59 -07:00
commit 723c2c43c8
71 changed files with 672 additions and 392 deletions

View file

@ -1,16 +1,49 @@
# Comment
PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
RPROMPT='%{$fg[magenta]%}$GIT_PROMPT_INFO%{$reset_color%} $GIT_RPROMPT_INFO%{$reset_color%}'
RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(git_prompt_status)%{$reset_color%}'
git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
local prompt=''
git_prompt__branch
prompt="$GIT_PROMPT_BRANCH"
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
GIT_PROMPT_INFO="$prompt"
local rprompt=''
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
rprompt="%{$fg[cyan]%} ✈"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[yellow]%} ✭"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[yellow]%} ✭"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[blue]%} ➦"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[magenta]%} ✂"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[grey]%} ✱"
fi
GIT_RPROMPT_INFO=$rprompt
}