bug-ed
[Top][All Lists]
Advanced

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

Re: ed proposal - multiple files on command line


From: Andrew L. Moore
Subject: Re: ed proposal - multiple files on command line
Date: Thu, 9 Nov 2006 23:58:21 -0800 (PST)

Paul,

One immediate issue with the use of percent sign (`%') to represent
"the next file" is that, in the context of a shell command, it
has traditionally been replaced with the current filename. Thus:

    $ ed
    f o.tmp
    !echo %
    echo o.tmp
    o.tmp
    !

The percent sign is also used in a similar manner in substitutions,
being replaced in a right-hand side pattern with the previous right-hand
side pattern:

    $ ed
    a
    silk
    .
    s/k/t
    silt
    s/s/%
    tilt

On the other hand, both emacs (as `C-X #') and vi (as `:e #') use
hash mark (`#') in a manner that might be more consistent with your
intentions.

An alternative would be to use a different command altogether, say,
capital N.  Either way, unless there is a demonstrable need for an
interim solution, it might be preferable to wait until true multi-file
support is introduced before choosing a syntax.  I still have your patches
and appreciate  your interest.

-AM




reply via email to

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