Shawn Wagner wrote:
Two more I have in mind:

Supporting a GNU sed extension of taking both a starting offset and g
with s///Ng - replace all matches starting with the Nth one. I have
this mostly done; I'm not sure how it should interact with the current
toggling behavior of sN and sg, though.

I'm about to start implementing this one a little differently:

  'gN' replace the first N matches.
  'Ng' replace from the Nth match to the last. (like GNU sed)

I was also thinking about removing the toggling behavior of sN and sg, and just make the alternative syntax form of the 's' command interpret 'N' and 'g' just as the standard 's' command does. This seems to me more useful than "toggling" the proposed new behavior.

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?

Antonio.

Reply via email to