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