On Mon, Mar 29, 2021 at 11:59 AM Norman Wilson <norman@oclsc.org> wrote:
 
The b command (stands for browse) came from late-1970s
U of T; rob probably brought it to 1127.

It's little things like this that make me use ex rather than ed, though it is spelled z there.  Linux ed has z as an extension.
There were a
handful of other syntactic conveniences, like being
allowed to leave off the final delimeter of an s command,
and declaring that a missing address means 1 before the
comma or semicolon and $ after, so
        3,s/fish/&head
works over all lines from 3 to the last, and , standing
alone addresses the whole buffer.

Those things are in Posix now.  Linux ed is a superset of Posix; *BSD ed is rather lacking, being based on an old SVID.
Also the idea that s followed by a digit N means start
with the Nth instance of the pattern:
        s3/fish/&head/
affects only the third fish, and
        s3/fish/&head/g
every fish after the second.

That's neither Posix ed nor ex, and very annoying it is to lack it.
b.  The > < | commands, [...] make qed into a kind of workbench,
both for massaging data and for constructing a list
of commands to send to the shell.

I gather current Linux/BSD eds have > and <, spelled
r ! and w !, but without | it just ain't the same,
rather like the way | revolutionized the shell.

Ex extends the ! command to accept numeric arguments and has the same semantics.  Unfortunately, although "r !" and "w !" are in both Posix ed and ex, in ex "w !foo" means "output to the foo command" whereas "w! foo" means "write to foo, ignoring the internal 'don't overwrite' bit that you can set."

I wrote two specs that may be of interest to someone: 

<https://github.com/johnwcowan/exx/blob/master/exx/exx-features.txt> was my attempt to describe "ex extended" that could still be a lightweight editor by not needing the vi bag on the side.

<https://github.com/johnwcowan/exx/blob/master/sam/sam-extensions.txt> is a list of things that make me not want to use sam -d editing until they are provided in some form.



John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
On the Semantic Web, it's too hard to prove you're not a dog.
        --Bill de hOra