diff options
author | Robby Russell <robby@planetargon.com> | 2012-12-02 09:54:24 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2012-12-02 09:54:24 -0800 |
commit | 08cb82b9f476034baddace7c9a9b06299afc89f5 (patch) | |
tree | 29f8dbc9f419a31e1ee2e1c21ff10745a4021310 /themes/frisk.zsh-theme | |
parent | 7dfd6406d84a8ff7b6f2f67f1f5c30d132bdce65 (diff) | |
parent | b727e337adb0264b3d03ffdd0a4af3ba9802572a (diff) | |
download | zsh-08cb82b9f476034baddace7c9a9b06299afc89f5.tar.gz zsh-08cb82b9f476034baddace7c9a9b06299afc89f5.tar.bz2 zsh-08cb82b9f476034baddace7c9a9b06299afc89f5.zip |
Merge pull request #448 from n0nick/patch-1
Updated the frisk theme to display Bazaar branch information as well
Diffstat (limited to 'themes/frisk.zsh-theme')
-rw-r--r-- | themes/frisk.zsh-theme | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/themes/frisk.zsh-theme b/themes/frisk.zsh-theme index f181aec90..2c999a6a6 100644 --- a/themes/frisk.zsh-theme +++ b/themes/frisk.zsh-theme @@ -1,10 +1,22 @@ 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%} ' 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_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" 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 +} |