mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
Updated the frisk theme to display Bazaar branch information as well (based on zedtux.zsh-theme http://j.mp/ikTZJj)
This commit is contained in:
parent
3552423de3
commit
b727e337ad
1 changed files with 14 additions and 2 deletions
|
@ -1,10 +1,22 @@
|
||||||
PROMPT=$'
|
PROMPT=$'
|
||||||
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
|
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
|
||||||
%{$fg_bold[black]%}>%{$reset_color%} '
|
%{$fg_bold[black]%}>%{$reset_color%} '
|
||||||
|
|
||||||
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
|
GIT_CB="git::"
|
||||||
|
ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}["
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
## 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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue