mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 05:00:59 +01:00
44962: vcs_info: Document internal function and variable
This commit is contained in:
parent
5b4a6dc7e0
commit
ce950dd4b4
3 changed files with 22 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
2019-12-03 Daniel Shahaf <danielsh@apache.org>
|
2019-12-03 Daniel Shahaf <danielsh@apache.org>
|
||||||
|
|
||||||
|
* 44962: Functions/VCS_Info/VCS_INFO_bydir_detect,
|
||||||
|
Functions/VCS_Info/vcs_info: vcs_info: Document internal function
|
||||||
|
and variable
|
||||||
|
|
||||||
* 44964: Doc/Zsh/redirect.yo: zshmisc(1): Document APPEND_CREATE
|
* 44964: Doc/Zsh/redirect.yo: zshmisc(1): Document APPEND_CREATE
|
||||||
under the append redirection operators, >> and >>!.
|
under the append redirection operators, >> and >>!.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,18 @@
|
||||||
## Written by Frank Terbeck <ft@bewatermyfriend.org>
|
## Written by Frank Terbeck <ft@bewatermyfriend.org>
|
||||||
## Distributed under the same BSD-ish license as zsh itself.
|
## Distributed under the same BSD-ish license as zsh itself.
|
||||||
|
|
||||||
|
# Helper function for VCS_INFO_detect_*
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# vcs_comm[detect_need_file]=FILENAMES VCS_INFO_bydir_detect DIRNAME
|
||||||
|
# where DIRNAME is a directory name and FILENAMES is a space-separated list
|
||||||
|
# of filenames.
|
||||||
|
#
|
||||||
|
# If any parent directory of the current working directory, other than the root
|
||||||
|
# directory, contains a subdirectory named DIRNAME that contains a file whose name
|
||||||
|
# is in FILENAMES, set vcs_comm[basedir] to the path of that parent directory and
|
||||||
|
# return true. Otherwise, return false.
|
||||||
|
|
||||||
setopt localoptions NO_shwordsplit
|
setopt localoptions NO_shwordsplit
|
||||||
local dirname=$1
|
local dirname=$1
|
||||||
local basedir="." file
|
local basedir="." file
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,12 @@ vcs_info () {
|
||||||
local -x LC_MESSAGES
|
local -x LC_MESSAGES
|
||||||
local -i maxexports
|
local -i maxexports
|
||||||
local -a msgs
|
local -a msgs
|
||||||
|
|
||||||
|
# vcs_comm is used internally for passing values among VCS_INFO_* functions.
|
||||||
|
# It is not part of the public API.
|
||||||
|
#
|
||||||
|
# hook_com, backend_misc, and user_data are public API; see zshcontrib(1)
|
||||||
|
# and Misc/vcs_info-examples.
|
||||||
local -A vcs_comm hook_com backend_misc user_data
|
local -A vcs_comm hook_com backend_misc user_data
|
||||||
|
|
||||||
LC_MESSAGES=C
|
LC_MESSAGES=C
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue