2013-11-06 22:10:59 +00:00
|
|
|
## Bazaar integration
|
|
|
|
## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT
|
|
|
|
function bzr_prompt_info() {
|
2013-12-23 12:24:57 +00:00
|
|
|
BZR_BRANCH=$(command bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print $1}')
|
|
|
|
|
2013-12-23 13:12:48 +00:00
|
|
|
if [[ -n "$BZR_BRANCH" ]]; then
|
2013-12-23 12:24:57 +00:00
|
|
|
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_BRANCH$(parse_bzr_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
2013-11-06 22:10:59 +00:00
|
|
|
fi
|
2013-12-23 12:24:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function parse_bzr_dirty() {
|
|
|
|
BZR_STATUS=$(command bzr status 2> /dev/null | tail -n1)
|
|
|
|
|
|
|
|
if [[ -n "$BZR_STATUS" ]]; then
|
|
|
|
echo $ZSH_THEME_GIT_PROMPT_DIRTY
|
|
|
|
else
|
|
|
|
echo $ZSH_THEME_GIT_PROMPT_CLEAN
|
|
|
|
fi
|
|
|
|
}
|