zhann.zsh-theme
727 bytes
1autoload -Uz vcs_info
2
3zstyle ':vcs_info:*' stagedstr '%F{green}โ'
4zstyle ':vcs_info:*' unstagedstr '%F{yellow}โ'
5zstyle ':vcs_info:*' check-for-changes true
6zstyle ':vcs_info:svn:*' branchformat '%b'
7zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]'
8zstyle ':vcs_info:*' enable git svn
9
10theme_precmd () {
11 if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
12 zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]'
13 else
14 zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}โ%F{green}]'
15 fi
16
17 vcs_info
18}
19
20setopt prompt_subst
21PROMPT='%B%F{blue}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% '
22
23autoload -U add-zsh-hook
24add-zsh-hook precmd theme_precmd
25