<?xml version="1.0"?>
<application>
 <metadata>
  <entry name="name">mtx-grep</entry>
  <entry name="detail">Simple Grepper</entry>
  <entry name="version">0.10</entry>
 </metadata>
 <flags>
  <category name="basic">
   <subcategory>
    <flag name="pattern"><short>search for pattern (optional)</short></flag>
    <flag name="count"><short>count matches only</short></flag>
    <flag name="all"><short>count all occurences in a line</short></flag>
    <flag name="nocomment"><short>skip lines that start with %% or #</short></flag>
    <flag name="noattic"><short>skip files that hh considers irrelevant</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>
    <example><command>mtxrun --script grep framed **.tex</command></example>
    <example><command>mtxrun --script grep framed **.tex --count</command></example>
   </subcategory>
  </category>
 </examples>
 <comments>
    <comment>patterns are lua patterns and need to be escaped accordingly</comment>
 </comments>
</application>
