1diff --git a/lib/bzr.zsh b/lib/bzr.zsh
2index 005a16500323aed129922d80fc54b270560478d7..78273d57876bd96cababc45488658dde40a34828 100644
3--- a/lib/bzr.zsh
4+++ b/lib/bzr.zsh
5@@ -1,10 +1,14 @@
6 ## Bazaar integration
7-## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT
8+## Just works with the GIT integration. Add $(bzr_prompt_info) to the PROMPT
9 function bzr_prompt_info() {
10- BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
11- if [ -n "$BZR_CB" ]; then
12- BZR_DIRTY=""
13- [[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}"
14- echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
15- fi
16-}
17+ local bzr_branch
18+ bzr_branch=$(bzr nick 2>/dev/null) || return
19+
20+ if [[ -n "$bzr_branch" ]]; then
21+ local bzr_dirty=""
22+ if [[ -n $(bzr status 2>/dev/null) ]]; then
23+ bzr_dirty=" %{$fg[red]%}*%{$reset_color%}"
24+ fi
25+ printf "%s%s%s%s" "$ZSH_THEME_SCM_PROMPT_PREFIX" "bzr::${bzr_branch##*:}" "$bzr_dirty" "$ZSH_THEME_GIT_PROMPT_SUFFIX"
26+ fi
27+}