5bad3f890de691194b77cfc33846e2102e21ea93

Author
Steven De Coeyer <steven@banteng.be>
Committer
Steven De Coeyer <steven@banteng.be>
Date

Message

Updates Zhann theme

Diff

 1diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme
 2index 5c49fe79b5e769bff7711c8f2d27b89d67005a5b..5c085473002a5decae40d9cc7dec78beb5cdf586 100644
 3--- a/themes/zhann.zsh-theme
 4+++ b/themes/zhann.zsh-theme
 5@@ -1,15 +1,25 @@
 6-PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
 7+autoload -U colors && colors
 8 
 9-if [ -e ~/.rvm/bin/rvm-prompt ]; then
10-  RPROMPT='%{$reset_color%} %{$fg[red]%}$(~/.rvm/bin/rvm-prompt i v g) %{$reset_color%}'
11-else
12-  if which rbenv &> /dev/null; then
13-    RPROMPT='%{$reset_color%} %{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//") %{$reset_color%}'
14-  fi
15-fi
16+autoload -Uz vcs_info
17 
18+zstyle ':vcs_info:*' stagedstr '%F{green}●'
19+zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
20+zstyle ':vcs_info:*' check-for-changes true
21+zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
22+zstyle ':vcs_info:*' enable git svn
23+theme_precmd () {
24+    if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
25+        zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]'
26+    } else {
27+        zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
28+    }
29+
30+    vcs_info
31+}
32+
33+setopt prompt_subst
34+PROMPT='%B%F{blue}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% '
35+
36+autoload -U add-zsh-hook
37+add-zsh-hook precmd  theme_precmd
38 
39-ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}"
40-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
41-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
42-ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"