ropers writes:
> > matthew: "ed reacts differently depending whether or not it's included".
> > can you explain how?

If I recall correctly, if the trailing delimiter is _not_ included then ed 
prints the result of the substitution. Possibly only if interactive.

> W/r/t Matthew's concerns, I also note that the
> > (.,.)s/re/replacement/
> section does mention this in its second paragraph:
> >> If one or two of the last delimiters is omitted, then the last line
> >> affected is printed as though the print suffix p were specified.
> I'm not quite sure what is meant by omission of *two* of the last
> delimiters there, but this does at least seem relevant to what we're
> discussing here.

Yes that sounds about right. Looks like some part of this behaviour is in 
documented already.

The pedantic part of me likes getting this pointless thing right but the 
pedantic part of me also wants to make sure it's actually right before changing 
something that evidently works already and isn't bothering anybody. I managed 
to learn ed with the manpage as it is.

It sounds like there might be a bit of confusion wrt. what does/doesn't happen 
vs. what's documented. Can the various interactions under discussion be 
actually clarified and enumerated to be sure we're not changing a minor mistake 
for a new mistake? I can do this tomorrow if nobody else jumps in but I'd get 
it wrong if I tried it now.

Matthew

Reply via email to