Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: (3/4) vcs_info: Add `no-vcs' hook
---
Doc/Zsh/contrib.yo | 5 +++++
Functions/VCS_Info/VCS_INFO_set | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 5c82c5d..bc4a814 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 a2b838c..23dc06b 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
--
1.7.4.1.140.g89781
Messages sorted by:
Reverse Date,
Date,
Thread,
Author