bzr.zsh
515 bytes
1## Bazaar integration
2## Just works with the GIT integration. Add $(bzr_prompt_info) to the PROMPT
3function bzr_prompt_info() {
4 local bzr_branch
5 bzr_branch=$(bzr nick 2>/dev/null) || return
6
7 if [[ -n "$bzr_branch" ]]; then
8 local bzr_dirty=""
9 if [[ -n $(bzr status 2>/dev/null) ]]; then
10 bzr_dirty=" %{$fg[red]%}*%{$reset_color%}"
11 fi
12 printf "%s%s%s%s" "$ZSH_THEME_SCM_PROMPT_PREFIX" "bzr::${bzr_branch##*:}" "$bzr_dirty" "$ZSH_THEME_GIT_PROMPT_SUFFIX"
13 fi
14}