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="nocomment"><short>skip lines that start with %% or #</short></flag> 14 <flag name="noattic"><short>skip files that hh considers irrelevant</short></flag> 15 <flag name="n"><short>show at most n matches</short></flag> 16 <flag name="first"><short>only show first match</short></flag> 17 <flag name="match"><short>return the match (if it is one)</short></flag> 18 <flag name="xml"><short>pattern is lpath expression</short></flag> 19 </subcategory> 20 </category> 21 </flags> 22 <examples> 23 <category> 24 <title>Examples</title> 25 <subcategory> 26 <example><command>mtxrun --script grep --pattern=module *.mkiv</command></example> 27 <example><command>mtxrun --script grep --pattern="modules.-%['(.-)'%]" char-*.lua --first</command></example> 28 <example><command>mtxrun --script grep --pattern=module --count *.mkiv</command></example> 29 <example><command>mtxrun --script grep --pattern=module --first *.mkiv</command></example> 30 <example><command>mtxrun --script grep --pattern=module --nocomment *.mkiv</command></example> 31 <example><command>mtxrun --script grep --pattern=module --n=10 *.mkiv</command></example> 32 </subcategory> 33 </category> 34 </examples> 35 <comments> 36 <comment>patterns are lua patterns and need to be escaped accordingly</comment> 37 </comments> 38</application> 39 |