9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] watching plumber
@ 2010-03-12 23:25 Rudolf Sykora
  2010-03-12 23:54 ` erik quanstrom
  2010-03-13 10:45 ` Rudolf Sykora
  0 siblings, 2 replies; 14+ messages in thread
From: Rudolf Sykora @ 2010-03-12 23:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-03-18 15:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 23:25 [9fans] watching plumber Rudolf Sykora
2010-03-12 23:54 ` erik quanstrom
2010-03-13  0:16   ` Rudolf Sykora
2010-03-13  0:39     ` erik quanstrom
2010-03-13  8:19       ` Rudolf Sykora
2010-03-13 10:45 ` Rudolf Sykora
2010-03-13 15:31   ` erik quanstrom
2010-03-13 17:14     ` Rudolf Sykora
2010-03-13 19:18       ` Rudolf Sykora
2010-03-13 23:05         ` erik quanstrom
2010-03-14 15:55           ` Rudolf Sykora
2010-03-14 20:11             ` erik quanstrom
2010-03-15  4:53               ` Anthony Sorace
2010-03-18 15:34                 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).