dotfiles/lib/bzr.zsh
Dreaded_X 21ca061287 Squashed 'oh-my-zsh/' content from commit 550ccca
git-subtree-dir: oh-my-zsh
git-subtree-split: 550ccca91cb45fcf26a8f2c3c60da675b995e3f3
2015-02-05 18:32:26 +01:00

10 lines
430 B
Bash

## Bazaar integration
## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT
function 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]%} * %{$fg[green]%}"
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}