bug-coreutils
[Top][All Lists]
Advanced

[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 23:39:55 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Matthew Woehlke <address@hidden> wrote:

> Disallowing it is fine, but if you disallow it, it seems reasonable to 
> expect the program to say that it was disallowed :-). (I'm on the fence 
> if this counts as a specification or implementation detail.)

The more specification details we can agree on, the less programming
time & effort will be wasted. But at a certain point, we need to write
them down somewhere else, otherwise it'll be hard to summarize them
easily.

> >Agreed (except s/nine/ten/).
> 
> Erm... no, I think nine is right...
> 
> line  n  -n
> 1     1  -9
> 2     2  -8
> 3     3  -7
> 4     4  -6
> 5     5  -5
> 6     6  -4
> 7     7  -3
> 8     8  -2
> 9     9  -1
> 
> ...so '5,-5' in this case refers to one line... the fifth one.

Yes, you're right.

> So I guess it's important to specify if '-1' means "the last line", or 
> "the n'th-to-last last line (n==1 in this example)" (in which case '-0' 
> means something). Similarly, if 'n,+k' means "k line(s), starting at n" 
> or "line n plus k line(s)". 

I fail to see where your descriptions don't apply to the current
working mechanism (implying that I eventually don't fully grok your 
wording).

> Possibly best to pick so that '-0' and '+0' both either make sense 
> or do not make sense. I think I lean towards being all one-based.

I wouldn't want to use '+0' & '-0', because '+0' is basically a 
no-op and assigning '-0' a meaning when '-1' does the same, seems 
superfluous. We could emit some kind of outbound-error though.





reply via email to

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