help: document about "grep" template keywords
authorYuya Nishihara <yuya@tcha.org>
Sun, 07 Oct 2018 22:50:12 +0900
changeset 40111 9967818a85fa
parent 40110 d1338b4e39d0
child 40112 288fdded64dd
help: document about "grep" template keywords
mercurial/commands.py
--- a/mercurial/commands.py	Sun Oct 07 17:35:25 2018 +0900
+++ b/mercurial/commands.py	Sun Oct 07 22:50:12 2018 +0900
@@ -2645,6 +2645,26 @@
     the repository are searched, including those that don't exist in the
     current branch or have been deleted in a prior changeset.
 
+    .. container:: verbose
+
+      Template:
+
+      The following keywords are supported in addition to the common template
+      keywords and functions. See also :hg:`help templates`.
+
+      :change:  String. Character denoting insertion ``+`` or removal ``-``.
+                Available if ``--diff`` is specified.
+      :lineno:  Integer. Line number of the match.
+      :path:    String. Repository-absolute path of the file.
+      :texts:   List of text chunks.
+
+      And each entry of ``{texts}`` provides the following sub-keywords.
+
+      :matched: Boolean. True if the chunk matches the specified pattern.
+      :text:    String. Chunk content.
+
+      See :hg:`help templates.operators` for the list expansion syntax.
+
     Returns 0 if a match is found, 1 otherwise.
     """
     opts = pycompat.byteskwargs(opts)