diff --git a/ChangeLog b/ChangeLog index 808344d2f..6c70d1acf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,9 @@ Functions/VCS_Info/vcs_info_hookdel: Add functions to add/remove static hooks. + * 28961: Doc/Zsh/contrib.yo, Functions/VCS_Info/VCS_INFO_set: Add + `no-vcs' hook. + 2011-03-29 Mikael Magnusson * unposted: Completion/Unix/Command/_vim: Fix typo in @@ -14407,5 +14410,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5237 $ +* $Revision: 1.5238 $ ***************************************************** diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 5c82c5d46..bc4a814a5 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -1307,6 +1307,11 @@ When setting tt(ret) to non-zero, the string in tt(${hook_com[guards-string]}) will be used in the var(%g) escape in the tt(patch-format) and tt(nopatch-format) styles. ) +item(tt(no-vcs))( +This hooks is called when no version control system was detected. + +The `hook_com' parameter is not used. +) item(tt(post-quilt))( Called after the tt(quilt) support is done. The following information is passed as arguments to the hook: 1. the quilt-support mode (`addon' or diff --git a/Functions/VCS_Info/VCS_INFO_set b/Functions/VCS_Info/VCS_INFO_set index a2b838cdb..23dc06b4b 100644 --- a/Functions/VCS_Info/VCS_INFO_set +++ b/Functions/VCS_Info/VCS_INFO_set @@ -16,6 +16,7 @@ if [[ $1 == '--nvcs' ]] ; then typeset -gx vcs_info_msg_${i}_= done VCS_INFO_nvcsformats $2 + [[ $2 != '-preinit-' ]] && VCS_INFO_hook "no-vcs" fi (( ${#msgs} - 1 < 0 )) && return 0