zhann.zsh-theme 686 B

1234567891011121314151617181920212223
  1. autoload -Uz vcs_info
  2. zstyle ':vcs_info:*' stagedstr '%F{green}●'
  3. zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
  4. zstyle ':vcs_info:*' check-for-changes true
  5. zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
  6. zstyle ':vcs_info:*' enable git svn
  7. theme_precmd () {
  8. if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
  9. zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]'
  10. } else {
  11. zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
  12. }
  13. vcs_info
  14. }
  15. setopt prompt_subst
  16. PROMPT='%B%F{blue}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% '
  17. autoload -U add-zsh-hook
  18. add-zsh-hook precmd theme_precmd