bug-ed
[Top][All Lists]
Advanced

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

Re: [Bug-ed] Invalid command "ppp" accepted without error


From: Martin Guy
Subject: Re: [Bug-ed] Invalid command "ppp" accepted without error
Date: Sat, 27 Feb 2016 22:14:03 +0100

On 27/02/2016, Ori Avtalion <address@hidden> wrote:
> On Sat, Feb 27, 2016 at 6:42 PM, Antonio Diaz Diaz <address@hidden> wrote:
>> What CVS? Latest code is 1.13.
>
> Whoops, I was under the mistaken assumption that the code on Savannah
> is the latest. It's very old and perhaps should be removed.
> https://savannah.gnu.org/projects/ed/
>
>> "The use of printing commands with printing suffixes (such as pn, lp, and
>> so
>> on) was made unspecified because BSD-based systems allow this, whereas
>> System V does not."

Moral: don't use them in scripts meant to be portable.
What does original ed do?

> The way the it's worded, commands are only allowed one suffix letter:
>   "any command (except e, E, f, q, Q, r, w, and !) can be suffixed by
> the letter l, n, or p" [but it accepts pln].

I remember seeing in the code that that's how it works when it parses
them, just setting the relative flag variables.

If those combinations are potentially useful, maybe document the
variance in the manual page with a dire warning about not using them
in scripts meant to be portable?
Or disallow more than one to help people write portable scripts? :)

   M



reply via email to

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