[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: While we're talking about new features
From: |
Andrew L. Moore |
Subject: |
Re: While we're talking about new features |
Date: |
Tue, 11 Apr 2023 16:43:06 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 |
On 2022-11-09 19:05:57 +0100 Antonio Diaz Diaz wrote:
┃ ┃ Adding an ex-like range to ! that sends the addressed lines to an
┃ ┃ external command and replaces them with its output.
┃
┃ I don't think there's any good way to do this now that doesn't involve
multiple
┃ steps and a temporary file.
┃
┃ For the time being I have documented in the manual the "multiple
steps" approach while
┃
┃ I can decide how to implement it (with fork like zutils, or old style
with a temporary file).
┃
┃ What do you think?
If you're okay with fork/exec, you should be able to pretty much cut
and paste the filter-lines function:
https://github.com/slewsys/ed/blob/b2e4681c3627f7b135cb4702c6071c628e5dcd6d/src/aux.c#L47
Here's where it's actually called:
https://github.com/slewsys/ed/blob/b2e4681c3627f7b135cb4702c6071c628e5dcd6d/src/exec.c#L1752
I'm not at liberty to make a formal patch at the moment, but the code
is free and clear to use.
-AM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: While we're talking about new features,
Andrew L. Moore <=