1<?xml version="1.0"?> 2<application> 3 <metadata> 4 <entry name="name">mtx-grep</entry> 5 <entry name="detail">Simple Grepper</entry> 6 <entry name="version">0.10</entry> 7 </metadata> 8 <flags> 9 <category name="basic"> 10 <subcategory> 11 <flag name="pattern"><short>search for pattern (optional)</short></flag> 12 <flag name="count"><short>count matches only</short></flag> 13 <flag name="all"><short>count all occurences in a line</short></flag> 14 <flag name="nocomment"><short>skip lines that start with %% or #</short></flag> 15 <flag name="noattic"><short>skip files that hh considers irrelevant</short></flag> 16 <flag name="n"><short>show at most n matches</short></flag> 17 <flag name="first"><short>only show first match</short></flag> 18 <flag name="match"><short>return the match (if it is one)</short></flag> 19 <flag name="xml"><short>pattern is lpath expression</short></flag> 20 </subcategory> 21 </category> 22 </flags> 23 <examples> 24 <category> 25 <title>Examples</title> 26 <subcategory> 27 <example><command>mtxrun --script grep --pattern=module *.mkiv</command></example> 28 <example><command>mtxrun --script grep --pattern="modules.-%['(.-)'%]" char-*.lua --first</command></example> 29 <example><command>mtxrun --script grep --pattern=module --count *.mkiv</command></example> 30 <example><command>mtxrun --script grep --pattern=module --first *.mkiv</command></example> 31 <example><command>mtxrun --script grep --pattern=module --nocomment *.mkiv</command></example> 32 <example><command>mtxrun --script grep --pattern=module --n=10 *.mkiv</command></example> 33 </subcategory> 34 </category> 35 </examples> 36 <comments> 37 <comment>patterns are lua patterns and need to be escaped accordingly</comment> 38 </comments> 39</application> 40 |