aboutsummaryrefslogtreecommitdiff
path: root/.oh-my-zsh/lib/bzr.zsh
diff options
context:
space:
mode:
authorMarvin Borner2019-03-05 01:09:01 +0100
committerMarvin Borner2019-03-05 01:09:01 +0100
commit55457187d18221e76bd12f0fb2cfab65c49b92fb (patch)
tree8db042d2d80710d54100c2709ad4332153ac848a /.oh-my-zsh/lib/bzr.zsh
Initial commit
Diffstat (limited to '.oh-my-zsh/lib/bzr.zsh')
-rw-r--r--.oh-my-zsh/lib/bzr.zsh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.oh-my-zsh/lib/bzr.zsh b/.oh-my-zsh/lib/bzr.zsh
new file mode 100644
index 0000000..005a165
--- /dev/null
+++ b/.oh-my-zsh/lib/bzr.zsh
@@ -0,0 +1,10 @@
+## 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
+} \ No newline at end of file