ecfac1cd74cada9594531d6c0217e511914a14f6
- Author
- David Aaron Fendley <tricon@me.com>
- Committer
- David Aaron Fendley <tricon@me.com>
- Date
Message
Added VCS prompt to Apple theme.
Diff
1diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme
2index 350548e366441b910e38956f1eb7dc997703093c..92f1df941e7c0f027b78df4b86ebeeb7db4b82b3 100644
3--- a/themes/apple.zsh-theme
4+++ b/themes/apple.zsh-theme
5@@ -2,4 +2,25 @@ function toon {
6 echo -n ""
7 }
8
9-PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}'
10+get_git_dirty() {
11+ git diff --quiet || echo '*'
12+}
13+
14+autoload -Uz vcs_info
15+autoload -U colors && colors
16+zstyle ':vcs_info:*' check-for-changes true
17+zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
18+zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
19+zstyle ':vcs_info:*' actionformats \
20+ '%F{5}%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f '
21+zstyle ':vcs_info:*' formats \
22+ '%F{5}%F{5}[%F{2}%b%c%u%F{5}]%f '
23+zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
24+zstyle ':vcs_info:*' enable git cvs svn
25+
26+precmd () {
27+ vcs_info
28+}
29+
30+setopt prompt_subst
31+PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}'