On Mon, Mar 13, 2017 at 5:15 PM, Andy Lester <
an...@petdance.com> wrote:
> —clump would have to be mutex with any of the context flags.
Probably so. I could imagine wanting context around a clump cluster
but i have more trouble imagining implementing both at once !
Ok, you seem to be matching input lines line by line as per normal,
and just clumping the _output_ lines if sequential (or spacing when
not sequential)
... which is not what i originally thought you meant.
Due to my previously suggested bias, I was (mis)interpreting your
cluster/clump as clumping _input_ lines in a way loosely analogous to
the context range -C/-A/-B *except* (a) the whole multiline paragraph
as matchable, and (b) some other print rules.
Your example output made me think --output '$1: $2' would be very
useful with multiline clumped match
clumping multiple _input_ lines per my (mis)interpretation could be via
* paragrep-ish, taking all to blank line (or some other magic token on
a flag) - and steping forward by whole paragraphs;
* -C/-A/-B style count of lines; and stepping by one line or
optionally by the whole group (always or if matched?)
* via matching leftmost unmatched bracketish char on current line to
it's close, but stepping to next line. (User's pattern needs to not
match every surrounding brackets or it will duplicate hits, but that's
user problem.)
--
Bill Ricker
bill....@gmail.com
https://www.linkedin.com/in/n1vux