From efc37c1f715eb77be5f30411fa36589727643126 Mon Sep 17 00:00:00 2001 From: Pablo Rubianes Date: Wed, 6 Nov 2013 20:10:59 -0200 Subject: [PATCH 1/2] Modification to the frisk theme to work with the BZR lib --- lib/bzr.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/bzr.zsh diff --git a/lib/bzr.zsh b/lib/bzr.zsh new file mode 100644 index 000000000..005a16500 --- /dev/null +++ b/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 From 248890b6e699365dee469178ec96f5d1fad91871 Mon Sep 17 00:00:00 2001 From: Pablo Rubianes Date: Wed, 6 Nov 2013 20:16:09 -0200 Subject: [PATCH 2/2] Modification to the frisk theme to work with the BZR lib --- themes/frisk.zsh-theme | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/themes/frisk.zsh-theme b/themes/frisk.zsh-theme index 2c999a6a6..653c7461f 100644 --- a/themes/frisk.zsh-theme +++ b/themes/frisk.zsh-theme @@ -10,13 +10,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} " ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" ZSH_THEME_GIT_PROMPT_CLEAN="" - -## Bazaar integration -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]%} *%{$reset_color%}" - echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX" - fi -}