2
我想添加vcs_info钩子到我的.zshrc,但没有调试选项产量输出,我一直无法找出原因 - 任何提示?
来源:从我的.zshrc
vcs_info examples
shouse .zsh prompt
摘录:zsh vcs_info - 无挂钩或调试输出
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*+*:*' debug true
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*:*' get-revision true
zstyle ':vcs_info:git*:*' check-for-changes true
zstyle ':vcs_info:git*' formats '%b'
zstyle ':vcs_info:git*' actionformats '%b:%a'
zstyle ':vcs_info:git*+set-message:*' hooks foobar
function +vi-foobar() { echo "foobar" }
function prompt_precmd() { vcs_info }
function set_prompt { PROMPT="${vcs_info_msg_0_}" }
autoload -U add-zsh-hook
add-zsh-hook precmd prompt_precmd
add-zsh-hook precmd set_prompt
整个.zshrc可以在我的GitHub页面上找到(如有更改),我希望我没有在摘录中留下任何关键的东西。 OS X 10.6.8,zsh 4.3.9(i386-apple-darwin10.0)。 – totte 2011-12-30 23:56:49