From a8ad9768bdf68562c929d6558ef74fb727645f55 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 30 Dec 2017 06:14:09 +0000 Subject: unposted: vcs_info: Add docstrings to the internal functions VCS_INFO_formats and VCS_INFO_set. --- Functions/VCS_Info/VCS_INFO_formats | 7 ++++++- Functions/VCS_Info/VCS_INFO_set | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Functions') diff --git a/Functions/VCS_Info/VCS_INFO_formats b/Functions/VCS_Info/VCS_INFO_formats index 4d0dd75c2..e0e1dc738 100644 --- a/Functions/VCS_Info/VCS_INFO_formats +++ b/Functions/VCS_Info/VCS_INFO_formats @@ -34,7 +34,7 @@ hook_com[subdir_orig]="${hook_com[subdir]}" VCS_INFO_hook 'post-backend' -## description: +## description (for backend authors): # action: a string that signals a certain non-default condition in the # repository (like 'rebase-i' in git). If this in non-empty, # the actionformats will be used, too. @@ -49,6 +49,11 @@ VCS_INFO_hook 'post-backend' # should be provided. eg: # VCS_INFO_formats '' "${foobranch}" "${foobase}" '' '' '' "${foomisc}" +## description (vcs_info internals): +# This function is called by the backend with information about the repository, +# and (after some manipulations) populates the ${msgs} variable in preparation +# for calling VCS_INFO_set. + if [[ -n ${hook_com[action]} ]] ; then zstyle -a ":vcs_info:${vcs}:${usercontext}:${rrn}" actionformats msgs (( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b|%a]%u%c-' diff --git a/Functions/VCS_Info/VCS_INFO_set b/Functions/VCS_Info/VCS_INFO_set index e3f62ceef..0e5849147 100644 --- a/Functions/VCS_Info/VCS_INFO_set +++ b/Functions/VCS_Info/VCS_INFO_set @@ -2,6 +2,8 @@ ## Written by Frank Terbeck ## Distributed under the same BSD-ish license as zsh itself. +# This function sets ${vcs_info_msg__} from ${msgs}. + setopt localoptions noksharrays NO_shwordsplit unset local -i i j -- cgit 1.4.1