GNU bug report logs - #22460
'y' command doesn't allow a comment after it one the same line

Previous Next

Package: sed;

Reported by: Thorsten Heymann <hek2mgl <at> metashock.net>

Date: Mon, 25 Jan 2016 01:57:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 22460 <at> debbugs.gnu.org, Thorsten Heymann <hek2mgl <at> metashock.net>
Subject: bug#22460: 'y' command doesn't allow a comment after it one the same line
Date: Sat, 18 Mar 2017 20:34:48 -0700
On Thu, Jan 26, 2017 at 7:04 PM, Assaf Gordon <assafgordon <at> gmail.com> wrote:
> Hello Thorsten,
>
> Sorry for the delayed response.
>
> On Mon, Jan 25, 2016 at 02:28:22AM +0100, Thorsten Heymann wrote:
>>
>> Unlike other commands, the current implementation of the 'y' command does
>> not allow a comment on the same line if the command is not
>> "terminated" by a ';'
>
>
> That is indeed a bug, and a rather old one.
>
> Your suggested fix is correct, but I thought that instead of
> duplicating the same few lines, it might be better to extract
> the code to a new function.
>
> The attached patch does that and adds a corresponding unit test.

Thank you, Thorsten, for the report and patch.

Hi Assaf,
Thanks a lot for improving it and adding tests.

Would you please separate the factoring-out of your new function and
the bug fix into two commits?
Maybe even putting the tests in a third.

A nit in the commit log, now that 4.4 is out, it should say sed-4.4,
not 4.3, of course.




This bug report was last modified 8 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.