2
0

zhann.zsh-theme 727 B

12345678910111213141516171819202122232425
  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:svn:*' branchformat '%b'
  6. zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]'
  7. zstyle ':vcs_info:*' enable git svn
  8. theme_precmd () {
  9. if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
  10. zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]'
  11. else
  12. zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
  13. fi
  14. vcs_info
  15. }
  16. setopt prompt_subst
  17. PROMPT='%B%F{blue}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% '
  18. autoload -U add-zsh-hook
  19. add-zsh-hook precmd theme_precmd