about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_bydir_detect
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-01 00:04:46 +0000
committerDaniel Shahaf <danielsh@apache.org>2019-12-03 02:56:01 +0000
commitce950dd4b4b56e39a5011c54179832ba2ed04e61 (patch)
tree2c3f9e9a6003768bfbdf97ac29ce68e570085628 /Functions/VCS_Info/VCS_INFO_bydir_detect
parent5b4a6dc7e080dc3007ceb32f7f9689c5c4c2cd13 (diff)
downloadzsh-ce950dd4b4b56e39a5011c54179832ba2ed04e61.tar.gz
zsh-ce950dd4b4b56e39a5011c54179832ba2ed04e61.tar.xz
zsh-ce950dd4b4b56e39a5011c54179832ba2ed04e61.zip
44962: vcs_info: Document internal function and variable
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_bydir_detect')
-rw-r--r--Functions/VCS_Info/VCS_INFO_bydir_detect12
1 files changed, 12 insertions, 0 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_bydir_detect b/Functions/VCS_Info/VCS_INFO_bydir_detect
index b20c05c9c..29b261413 100644
--- a/Functions/VCS_Info/VCS_INFO_bydir_detect
+++ b/Functions/VCS_Info/VCS_INFO_bydir_detect
@@ -2,6 +2,18 @@
 ## Written by Frank Terbeck <ft@bewatermyfriend.org>
 ## 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
 local dirname=$1
 local basedir="." file