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: Assaf Gordon <assafgordon <at> gmail.com>
To: Thorsten Heymann <hek2mgl <at> metashock.net>
Cc: 22460 <at> debbugs.gnu.org
Subject: bug#22460: 'y' command doesn't allow a comment after it one the same line
Date: Fri, 27 Jan 2017 03:04:27 +0000
[Message part 1 (text/plain, inline)]
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.

Comments welcomed,
- assaf


[0001-sed-allow-comments-braces-after-y.patch (text/x-diff, attachment)]

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.