bash中#::(hashtag/pound冒号)的用途是什么

bash中#::(hashtag/pound冒号)的用途是什么,bash,comments,sh,hashtag,Bash,Comments,Sh,Hashtag,我最近在看自制的源代码。因为它是一个流行的工具,所以代码可能比较干净。我注意到他们使用了:注释样式(示例:)。我在其他任何地方都没有看到过(而且很难搜索符号,所以我找不到任何关于它的提及)。这是公认的惯例吗?它有特殊的含义吗?它看起来像是手册页的某种文档片段:它是以标准手册页样式编写的,并记录了下面的脚本。这一点在中更为明显,在中可以找到类似的注释,其标记为@hide\u from\u man\u page: 现在,当您查看时,您可以看到它们确实是手册页片段,会自动包含在主brew.1手册页中:

我最近在看自制的源代码。因为它是一个流行的工具,所以代码可能比较干净。我注意到他们使用了
注释样式(示例:)。我在其他任何地方都没有看到过(而且很难搜索符号,所以我找不到任何关于它的提及)。这是公认的惯例吗?它有特殊的含义吗?

它看起来像是手册页的某种文档片段:它是以标准手册页样式编写的,并记录了下面的脚本。这一点在中更为明显,在中可以找到类似的注释,其标记为
@hide\u from\u man\u page

现在,当您查看时,您可以看到它们确实是手册页片段,会自动包含在主
brew.1
手册页中:

以及:

我不知道这在shell脚本中是否是一个公认的约定,但类似的约定在各种语言和/或文档工具中都有使用,例如JavaDoc(
/**
)、Doxygen(
/**
/*!
//
)、JsDoc(
/**
)或C♯ (
//

#: @hide_from_man_page
#:  * `vendor-install` [<target>]:
#:     Install vendor version of Homebrew dependencies.
#:  * `style` [`--fix`] [`--display-cop-names`] [<formulae>|<files>]:
#:    Check formulae or files for conformance to Homebrew style guidelines.
#:
#:    <formulae> is a list of formula names.
#:
#:    <files> is a list of file names.
#:
#:    <formulae> and <files> may not be combined. If both are omitted, style will run
#:    style checks on the whole Homebrew `Library`, including core code and all
#:    formulae.
#:
#:    If `--fix` is passed and `HOMEBREW_DEVELOPER` is set, style violations
#:    will be automatically fixed using RuboCop's `--auto-correct` feature.
#:
#:    If `--display-cop-names` is passed, the RuboCop cop name for each violation
#:    is included in the output.
#:
#:    Exits with a non-zero status if any style violations are found.
# To make changes to this man page:
#
# - For changes to a specific command (appears in the `COMMANDS` section):
#   - Edit the top comment in `Library/Homebrew/cmd/<command>.{rb,sh}`.
#   - Make sure to use the line prefix `#:` for the comments to be recognized as
#     documentation. If in doubt, compare with already documented commands.
# - For other changes: Edit this file.
#
# When done, regenerate the man page and its HTML version by running `brew man`.
<%= commands.join("\n") %>
.TP
\fBstyle\fR [\fB\-\-fix\fR] [\fB\-\-display\-cop\-names\fR] [\fIformulae\fR|\fIfiles\fR]
Check formulae or files for conformance to Homebrew style guidelines\.
.
.IP
\fIformulae\fR is a list of formula names\.
.
.IP
\fIfiles\fR is a list of file names\.
.
.IP
\fIformulae\fR and \fIfiles\fR may not be combined\. If both are omitted, style will run style checks on the whole Homebrew \fBLibrary\fR, including core code and all formulae\.
.
.IP
If \fB\-\-fix\fR is passed and \fBHOMEBREW_DEVELOPER\fR is set, style violations will be automatically fixed using RuboCop\'s \fB\-\-auto\-correct\fR feature\.
.
.IP
If \fB\-\-display\-cop\-names\fR is passed, the RuboCop cop name for each violation is included in the output\.
.
.IP
Exits with a non\-zero status if any style violations are found\.
.
<dt><code>style</code> [<code>--fix</code>] [<code>--display-cop-names</code>] [<var>formulae</var>|<var>files</var>]</dt><dd><p>Check formulae or files for conformance to Homebrew style guidelines.</p>

<p><var>formulae</var> is a list of formula names.</p>

<p><var>files</var> is a list of file names.</p>

<p><var>formulae</var> and <var>files</var> may not be combined. If both are omitted, style will run
style checks on the whole Homebrew <code>Library</code>, including core code and all
formulae.</p>

<p>If <code>--fix</code> is passed and <code>HOMEBREW_DEVELOPER</code> is set, style violations
will be automatically fixed using RuboCop's <code>--auto-correct</code> feature.</p>

<p>If <code>--display-cop-names</code> is passed, the RuboCop cop name for each violation
is included in the output.</p>