Re: [hackers] ed: Enable multi line commands

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 28 Dec 2023 10:40:32 +0100

Hi,

On Sun, Dec 24, 2023 at 12:07:44PM +0100, Rene Kita wrote:
> On Wed, Dec 13, 2023 at 12:55:26PM +0100, Roberto E. Vargas Caballero wrote:
> > It changes to read full lines before executing commands, escaping
> > newlines when it is needed. It solves 2 different cases:
> >
> > - Substitution commands with newlines in the replace part
>
> This does not work with a range:
>
> #v+
> $ ./ed
> i
> foobar1
> foobar2
> .
> 1,2s/foo/&\
> &/
> ,n
> 1 foo
> 2 foo
> 3 foobar1
> 4 foobar2

Good catch, I am going to add it to the list of known bugs.
Substitutions have problems, and this is the next thing that I
want to fix.



> #v-
>
> > - Global commands with append or insert commands
> >
> > Still, some additional problems were detected in the case of
> > global commands but they will be fixed in a follow up patchset.
>
> I did not test much, but what I tested worked.
>
> BTW, why is there no test suite? I started adding tests[0] for ed when I
> attempted to write a patch for this. It's still WIP, though.

Basically due to a lack of time. It is something that I discussed
with quinq a few weeks ago. We should add a test suite for all the
sbase commands, and mainly for ed and sed that at this moment are
the most complex one (the coming bc is also complex, but a bit less
in my opinion).

Regards
Received on Thu Dec 28 2023 - 10:40:32 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 28 2023 - 10:48:33 CET