diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/context/documents/general/manuals/math-mkiv.pdf | bin | 2722067 -> 2769223 bytes | |||
| -rw-r--r-- | doc/context/scripts/mkiv/mtx-grep.html | 12 | ||||
| -rw-r--r-- | doc/context/scripts/mkiv/mtx-grep.man | 9 | ||||
| -rw-r--r-- | doc/context/scripts/mkiv/mtx-grep.xml | 16 | 
4 files changed, 36 insertions, 1 deletions
| diff --git a/doc/context/documents/general/manuals/math-mkiv.pdf b/doc/context/documents/general/manuals/math-mkiv.pdfBinary files differ index 916766a0a..5b6a5441e 100644 --- a/doc/context/documents/general/manuals/math-mkiv.pdf +++ b/doc/context/documents/general/manuals/math-mkiv.pdf diff --git a/doc/context/scripts/mkiv/mtx-grep.html b/doc/context/scripts/mkiv/mtx-grep.html index 45a32f987..3ba8e8547 100644 --- a/doc/context/scripts/mkiv/mtx-grep.html +++ b/doc/context/scripts/mkiv/mtx-grep.html @@ -42,10 +42,20 @@          <tr><th>--pattern</th><td></td><td>search for pattern (optional)</td></tr>          <tr><th>--count</th><td></td><td>count matches only</td></tr>          <tr><th>--nocomment</th><td></td><td>skip lines that start with %% or #</td></tr> +        <tr><th>--n</th><td></td><td>show at most n matches</td></tr> +        <tr><th>--first</th><td></td><td>only show first match</td></tr> +        <tr><th>--match</th><td></td><td>return the match (if it is one)</td></tr>          <tr><th>--xml</th><td></td><td>pattern is lpath expression</td></tr>      </table>  <br/> -            </div> +<h1>Examples</h1> +<tt>mtxrun --script grep --pattern=module *.mkiv</tt> +<br/><tt>mtxrun --script grep --pattern="modules.-%['(.-)'%]" char-*.lua --first</tt> +<br/><tt>mtxrun --script grep --pattern=module --count *.mkiv</tt> +<br/><tt>mtxrun --script grep --pattern=module --first *.mkiv</tt> +<br/><tt>mtxrun --script grep --pattern=module --nocomment *.mkiv</tt> +<br/><tt>mtxrun --script grep --pattern=module --n=10 *.mkiv</tt> +<br/><br/>            </div>          </div>      </body>      </html> diff --git a/doc/context/scripts/mkiv/mtx-grep.man b/doc/context/scripts/mkiv/mtx-grep.man index 2a3d30316..02c4db2f9 100644 --- a/doc/context/scripts/mkiv/mtx-grep.man +++ b/doc/context/scripts/mkiv/mtx-grep.man @@ -20,6 +20,15 @@ count matches only  .B --nocomment  skip lines that start with %% or #  .TP +.B --n +show at most n matches +.TP +.B --first +only show first match +.TP +.B --match +return the match (if it is one) +.TP  .B --xml  pattern is lpath expression  .SH AUTHOR diff --git a/doc/context/scripts/mkiv/mtx-grep.xml b/doc/context/scripts/mkiv/mtx-grep.xml index d8567e035..a78565b57 100644 --- a/doc/context/scripts/mkiv/mtx-grep.xml +++ b/doc/context/scripts/mkiv/mtx-grep.xml @@ -11,10 +11,26 @@      <flag name="pattern"><short>search for pattern (optional)</short></flag>      <flag name="count"><short>count matches only</short></flag>      <flag name="nocomment"><short>skip lines that start with %% or #</short></flag> +    <flag name="n"><short>show at most n matches</short></flag> +    <flag name="first"><short>only show first match</short></flag> +    <flag name="match"><short>return the match (if it is one)</short></flag>      <flag name="xml"><short>pattern is lpath expression</short></flag>     </subcategory>    </category>   </flags> + <examples> +  <category> +   <title>Examples</title> +   <subcategory> +    <example><command>mtxrun --script grep --pattern=module *.mkiv</command></example> +    <example><command>mtxrun --script grep --pattern="modules.-%['(.-)'%]" char-*.lua --first</command></example> +    <example><command>mtxrun --script grep --pattern=module --count *.mkiv</command></example> +    <example><command>mtxrun --script grep --pattern=module --first *.mkiv</command></example> +    <example><command>mtxrun --script grep --pattern=module --nocomment *.mkiv</command></example> +    <example><command>mtxrun --script grep --pattern=module --n=10 *.mkiv</command></example> +   </subcategory> +  </category> + </examples>   <comments>      <comment>patterns are lua patterns and need to be escaped accordingly</comment>   </comments> | 
