bug-ed
[Top][All Lists]
Advanced

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

ed proposal - multiple files on command line


From: Paul Jackson
Subject: ed proposal - multiple files on command line
Date: Thu, 9 Nov 2006 18:27:39 -0800

A while back (in the year 1999) I proposed an extension to GNU ed
to the then maintainer, Andrew Moore.  He seemed interested, and
suggested I propose it to the list address@hidden, which
I did.  But then nothing more came of it.  This extension continues
to ship with SGI's Irix.

I would like to once again propose this extension.  Here is a copy
of my 1999 proposal:

============================= Begin =============================
Date: Mon, 28 Jun 1999 11:39:22 -0700 (PDT)
From: address@hidden (Paul Jackson)
To: address@hidden
Subject: ed proposal - multiple files on command line

Recently, I proposed to Andrew Moore <address@hidden>, the
current (for several years, now - thanks Andrew) maintainer of
ed, ye old command line editor, the following enhancement.

    I would like to add a feature to ed(1) - the ability to
    edit multiple command line specified files in a single
    ed invocation.

    I have, in a previous life, included this feature in all
    the Unix systems shipped by Convergent, including the AT&T
    Unix PC (circa 1985).  In my current life, as an employee
    of SGI for the last 10 years, I have included a different
    implementation of this feature in all SGI Irix systems
    shipped in the last 8 years.

    Now, with SGI's consent, I would like to include this
    feature in the gnu (GPL'd) version and BSD-licensed ed.

A comment from my copy of the code explains its usage:

    /*
     * ed file1 file2 ...
     *
     * Supports editing multiple files named on the command line.
     * To switch from the (N)th file to the (N+1)th file,
     * issue the command: e %.  The '%' is replaced with the name
     * of the next file from the command line.
     */

The implementation is simple, less than a dozen short lines of
code.

It's very non-intrusive -- if you don't attempt the command
'e %', then nothing is changed.  And if you invoke 'e %', but
haven't named multiple files on the command line, it still
behaves just like before -- tries to edit a file named '%'.

His initial response was positive, and he suggested that I
invite comments on this news group.

Any comments?  Anyone out there (besides me) even still use ed
as your main editor?
============================== End ==============================

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <address@hidden> 1.925.600.0401




reply via email to

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