2011-03-17 18:22:51 +00:00
|
|
|
PROMPT=$'
|
2011-06-27 08:37:27 +00:00
|
|
|
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
|
2011-03-17 18:22:51 +00:00
|
|
|
%{$fg_bold[black]%}>%{$reset_color%} '
|
|
|
|
|
|
|
|
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
|
|
|
|
2011-06-27 08:37:27 +00:00
|
|
|
GIT_CB="git::"
|
|
|
|
ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}["
|
|
|
|
ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB
|
2011-03-17 18:22:51 +00:00
|
|
|
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
|
|
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
|
|
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
2011-06-27 08:37:27 +00:00
|
|
|
|
|
|
|
## Bazaar integration
|
|
|
|
bzr_prompt_info() {
|
|
|
|
BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
|
|
|
|
if [ -n "$BZR_CB" ]; then
|
|
|
|
BZR_DIRTY=""
|
|
|
|
[[ -n `bzr status` ]] && BZR_DIRTY="%{$fg[red]%} *%{$reset_color%}"
|
|
|
|
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
|
|
|
fi
|
|
|
|
}
|