coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] csplit: new option --suppress-matched


From: Assaf Gordon
Subject: Re: [PATCH] csplit: new option --suppress-matched
Date: Sat, 30 Mar 2013 21:19:24 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 03/30/13 01:08, Pádraig Brady wrote:
On 03/28/2013 10:10 PM, Assaf Gordon wrote:
Attached is a new option for csplit, suppress-matched, as been mentioned few 
times before (e.g. 
http://lists.gnu.org/archive/html/coreutils/2013-02/msg00170.html ).

The awkward case here is with integer boundaries and offsets.

<...>

# Adding in the offset, we currently consider the
# offset line as the one to suppress, rather than the matched pattern.

This was exactly my original understanding of "matched" - not just "the line that 
matched the regular expression",
but the line that matched the specified pattern (i.e. regexp+offset or integer 
pattern) - and that's the line suppressed.

This could be confusing, but at least it's consistent.
So more accurately what we're doing is suppressing the boundary line.

So less confusingly and more accurately,
this option should probably be named/described as:

--suppress-boundary
   Suppress the boundary line from the start of the second and subsequent 
splits.

I'm fine with whichever name you decide. I find "matched" more natural, and not 
so confusing, but boundary is just as good.
I do think the description is a bit cumbersome (the "from the start of the second 
and subsequent splits" part) - it seems more confusing to me than with just omitting 
it.
It's probably one of those cases that a single example of input+output is worth 
more than a whole paragraph of explanation...

Nice work on the tests BTW.

Thanks.
I found "CMP" by accident, after almost writing an equivalent mechanism thing 
from scratch.
It's not mentioned in "tests/Coreutils.pm", perhaps I'll send a small patch for 
that.

I hope to apply this with the adjusted naming over the weekend.


Thanks again.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]