diff options
author | Christian Höltje <docwhat@gerf.org> | 2011-11-15 01:20:29 -0500 |
---|---|---|
committer | Christian Höltje <docwhat@gerf.org> | 2011-11-15 01:20:29 -0500 |
commit | 5277a0ffaacbc2e23c8753fefdf1c4fe6d1e7685 (patch) | |
tree | e2a9bfa1705ef0960a70aa951c4ef040a14f4621 /themes/apple.zsh-theme | |
parent | 40c47a737571468b759bbc30e4b4dc4b5f77470f (diff) | |
download | zsh-5277a0ffaacbc2e23c8753fefdf1c4fe6d1e7685.tar.gz zsh-5277a0ffaacbc2e23c8753fefdf1c4fe6d1e7685.tar.bz2 zsh-5277a0ffaacbc2e23c8753fefdf1c4fe6d1e7685.zip |
Added add-zsh-hook support to themes
I added add-zsh-hook support to the themes that didn't have it already.
This allows the themes to co-exist with plugins and lib/termsupport.
Diffstat (limited to 'themes/apple.zsh-theme')
-rw-r--r-- | themes/apple.zsh-theme | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme index 92f1df941..275341dc6 100644 --- a/themes/apple.zsh-theme +++ b/themes/apple.zsh-theme @@ -2,7 +2,7 @@ function toon { echo -n "" } -get_git_dirty() { +get_git_dirty() { git diff --quiet || echo '*' } @@ -18,9 +18,12 @@ zstyle ':vcs_info:*' formats \ zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' zstyle ':vcs_info:*' enable git cvs svn -precmd () { +theme_precmd () { vcs_info } setopt prompt_subst PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}' + +autoload -U add-zsh-hook +add-zsh-hook precmd theme_precmd
\ No newline at end of file |