From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Sat, 13 Mar 2010 00:25:20 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] watching plumber Topicbox-Message-UUID: e75bc0dc-ead5-11e9-9d60-3106f5b1d025 Hello, I wanted to add a plumbing rule. I added this: type is text data matches '[^{}]+' data matches '(figs/([a-zA-Z0-9[\].-_]*/)*)([a-zA-Z0-9.-_]+)' arg isdir $1 plumb start grep $2 $1/_source | sed -e 's/\.eps/.g/' | \ plumb -i -d edit However, it doesn't work. Is there any simple way how one can analyze what is wrong? I.e. to see that some rules are matched, others not, so that one can get the idea where the problem is (how far in the rules one gets)? Also. When having a rule like this data matches '(abc(def)*)(ghi)' what is going to be in $1, $2... Is ghi the contents of $2 or not? The plumber's behaviour I want to achieve is quite difficult to explain, nonetheless: for a text in an editor like {figs/10[CuNi]/Cxy} I want to find a line in figs/10[CuNi]/_source containing Cxy, it will be something like /abc/Cxy.eps and I really want to open a file /abc/Cxy.g in the editor. Thanks for any comments! Ruda