[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] linecut addition
From: |
Steven Schubiger |
Subject: |
Re: [RFC] linecut addition |
Date: |
Tue, 9 Oct 2007 21:55:17 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Matthew Woehlke <address@hidden> wrote:
> Well, yes, I would hope so. If you can't write 'a + b' in your program,
> something is wrong ;-). (Use case is of course e.g. scripts where the
> beginning line is not known in advance, but you know you want N lines
> total.)
Am I right assuming you mean something like '-20,+3' ?
> '-N' is already a fairly common convention, so I don't expect problems.
> And I stole '+N' from sed, of course :-).
OK.
> Ok. (An alternative, if sed-like format wins, would of course be '5,$',
> but '5,-0' is fine.)
I'm a bit hesitant to make it look too much like sed.
And I must correct myself here: "1,-1" is valid, whereas "1,-0" isn't.
> I was asking you :-). Personally I think printing lines backwards is
> probably not so good an idea, so I would either match only the first
> line, or else print a warning to stderr.
I think we should disallow it entirely. Worry later about the details.
> Anyway '5,2' was just an
> "obvious" example; I would expect this to be more likely with a range
> like '5,-5' on input with fewer than nine lines.
Agreed (except s/nine/ten/).
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/06
- Re: [RFC] linecut addition, Jim Meyering, 2007/10/08
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition,
Steven Schubiger <=
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/10