[Top][All Lists]

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

Re: ed proposal - multiple files on command line

From: John Cowan
Subject: Re: ed proposal - multiple files on command line
Date: Fri, 10 Nov 2006 02:02:04 -0500
User-agent: Mutt/1.3.28i

Paul Jackson scripsit:

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


> 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 '%'.

I like the feature, but not the syntax.  "%" in ex means
"this file", not "the next file".

Unfortunately, the n command means something different in
ed (ed's n is ex's #), or we could use that.  How about
":n"?  That is ex-compatible, because ex ignores leading
colons in command lines.

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

I'd like to use ed, but there are just enough features that ex has that
ed does not, that I can't, quite.  These are:

! with a range to process a range of lines through a command;

ex-style variant of the join command, handling whitespace well (in the
POSIX locale, when the last character on the first line of a pair of lines
to be joined is a period, two space characters will be added following the
period; when the last character of the first line is a blank character
or when the first character on the second line of the pair is a ")",
no space characters will be added; otherwise, one space character will
be added following the last character of the first line; extra blank
characters at the start of a line will be discarded);

> and < commands to indent and unindent, with multiple ones allowed.

As you read this, I don't want you to feel      John Cowan
sorry for me, because, I believe everyone       address@hidden
will die someday.                               http://www.ccil.org/~cowan
        --From a Nigerian-type scam spam

reply via email to

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