robbyrussell/oh-my-zsh — pull request #2373 by bmallred (2013-12-23 13:27:54+00:00)
Title: Updated BZR prompt info and added HG prompt info

lib/bzr.zsh
======

* Followed the pattern given by *lib/git.zsh* and refactored to have a separate function to determine if the BZR repository is dirty or clean.
* Removed static *"bzr::"* prefix to allow for custom defining in theme or configuration file(s).

lib/hg.zsh
======

* New library function to provide similar functionality as *lib/git.zsh* and *lib/bzr.zsh*.

Known Issues
========

* If the Mercurial (Hg) repository uses special plugins/extensions (i.e. largefiles) which have not been configured on the system then *hg_prompt_info()* will not display any repository information.

Example Theme
==========

```
if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
ZSH_THEME_CLOUD_PREFIX=''
fi

PROMPT='${ZSH_THEME_CLOUD_PREFIX} $FG[208]/* $FG[248]dir:%~ $FG[208]*/%{$reset_color%} '
RPROMPT='$(git_prompt_info)$(hg_prompt_info)$(bzr_prompt_info)'

# This is the standard prompt to be used between all version control systems.
VCS_PROMPT_PREFIX="$FG[208]["

ZSH_THEME_GIT_PROMPT_PREFIX="${VCS_PROMPT_PREFIX}$FG[248]git$FG[208]::$FG[248]"
ZSH_THEME_SCM_PROMPT_PREFIX="${VCS_PROMPT_PREFIX}$FG[248]bzr$FG[208]::$FG[248]"
ZSH_THEME_HG_PROMPT_PREFIX="${VCS_PROMPT_PREFIX}$FG[248]hg$FG[208]::$FG[248]"
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[208]]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="$FG[160]*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
```