bzr.zsh 515 B

1234567891011121314
  1. ## Bazaar integration
  2. ## Just works with the GIT integration. Add $(bzr_prompt_info) to the PROMPT
  3. function bzr_prompt_info() {
  4. local bzr_branch
  5. bzr_branch=$(bzr nick 2>/dev/null) || return
  6. if [[ -n "$bzr_branch" ]]; then
  7. local bzr_dirty=""
  8. if [[ -n $(bzr status 2>/dev/null) ]]; then
  9. bzr_dirty=" %{$fg[red]%}*%{$reset_color%}"
  10. fi
  11. printf "%s%s%s%s" "$ZSH_THEME_SCM_PROMPT_PREFIX" "bzr::${bzr_branch##*:}" "$bzr_dirty" "$ZSH_THEME_GIT_PROMPT_SUFFIX"
  12. fi
  13. }