frisk.zsh-theme 846 B

12345678910111213141516171819202122
  1. PROMPT=$'
  2. %{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
  3. %{$fg_bold[black]%}>%{$reset_color%} '
  4. PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
  5. GIT_CB="git::"
  6. ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}["
  7. ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB
  8. ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
  9. ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
  10. ZSH_THEME_GIT_PROMPT_CLEAN=""
  11. ## Bazaar integration
  12. bzr_prompt_info() {
  13. BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
  14. if [ -n "$BZR_CB" ]; then
  15. BZR_DIRTY=""
  16. [[ -n `bzr status` ]] && BZR_DIRTY="%{$fg[red]%} *%{$reset_color%}"
  17. echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
  18. fi
  19. }