apple.zsh-theme 888 B

123456789101112131415161718192021222324
  1. function toon {
  2. echo -n ""
  3. }
  4. autoload -Uz vcs_info
  5. zstyle ':vcs_info:*' check-for-changes true
  6. zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
  7. zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
  8. zstyle ':vcs_info:*' actionformats '%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f '
  9. zstyle ':vcs_info:*' formats '%F{5}[%F{2}%b%c%u%F{5}]%f '
  10. zstyle ':vcs_info:svn:*' branchformat '%b'
  11. zstyle ':vcs_info:svn:*' actionformats '%F{5}[%F{2}%b%F{1}:%F{3}%i%F{3}|%F{1}%a%c%u%F{5}]%f '
  12. zstyle ':vcs_info:svn:*' formats '%F{5}[%F{2}%b%F{1}:%F{3}%i%c%u%F{5}]%f '
  13. zstyle ':vcs_info:*' enable git cvs svn
  14. theme_precmd () {
  15. vcs_info
  16. }
  17. setopt prompt_subst
  18. PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}'
  19. autoload -U add-zsh-hook
  20. add-zsh-hook precmd theme_precmd