efc37c1f715eb77be5f30411fa36589727643126
- Author
- Pablo Rubianes <pablorubianes@gmail.com>
- Committer
- Pablo Rubianes <pablorubianes@gmail.com>
- Date
Message
Modification to the frisk theme to work with the BZR lib
Diff
1diff --git a/lib/bzr.zsh b/lib/bzr.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..005a16500323aed129922d80fc54b270560478d7
4--- /dev/null
5+++ b/lib/bzr.zsh
6@@ -0,0 +1,10 @@
7+## Bazaar integration
8+## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT
9+function bzr_prompt_info() {
10+ BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
11+ if [ -n "$BZR_CB" ]; then
12+ BZR_DIRTY=""
13+ [[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}"
14+ echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
15+ fi
16+}