bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A suggestion to add to gnu ed: command line option to start on line


From: Matthew Polk
Subject: Re: A suggestion to add to gnu ed: command line option to start on line foo or bar.
Date: Sun, 19 Feb 2023 07:48:45 -0500

I'm currently going through the source code for ed and given that
stuff like second_address is in multiple files and multiple functions,
it's a bit confusing how to do this. For anyone who knows more about
the program source code than I do, which file do you think I should be
looking into for this? With a casual glance at it, it appears that ed
just dumps the file contents into a buffer and just sets the last line
as the default. Any suggestions?

On Sun, Feb 19, 2023 at 7:07 AM John Cowan <cowan@ccil.org> wrote:
>
> Sounds good to me, but I don't have the time/energy to write the code at the 
> moment.
>
> On Sun, Feb 19, 2023 at 6:04 AM Martin Guy <martinwguy@gmail.com> wrote:
>>
>> On 19/02/2023, John Cowan <cowan@ccil.org> wrote:
>> > I would suggest [...] line argument +n causes the current line to be n,
>> > and [...] +/pattern causes the current line to be the first line matching
>> > the pattern.
>>
>> I concur. I was surprised to find that it doesn't already do this.
>> Let's call it a GNU extension :)
>> Would you like to prepare a patch to review?
>> That way, even if it doesn't get accepted for mainline,
>> we can all have our own versions that do :))
>>
>>     M



reply via email to

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