2013-11-06 15:10:59 -07:00
|
|
|
## Bazaar integration
|
2024-10-02 06:30:32 -07:00
|
|
|
## Just works with the GIT integration. Add $(bzr_prompt_info) to the PROMPT
|
2013-11-06 15:10:59 -07:00
|
|
|
function bzr_prompt_info() {
|
2024-10-02 06:30:32 -07:00
|
|
|
local bzr_branch
|
|
|
|
bzr_branch=$(bzr nick 2>/dev/null) || return
|
|
|
|
|
|
|
|
if [[ -n "$bzr_branch" ]]; then
|
|
|
|
local bzr_dirty=""
|
|
|
|
if [[ -n $(bzr status 2>/dev/null) ]]; then
|
|
|
|
bzr_dirty=" %{$fg[red]%}*%{$reset_color%}"
|
|
|
|
fi
|
|
|
|
printf "%s%s%s%s" "$ZSH_THEME_SCM_PROMPT_PREFIX" "bzr::${bzr_branch##*:}" "$bzr_dirty" "$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
|
|
|
fi
|
|
|
|
}
|