On 06/18/15 15:18, Jason McIntyre wrote:
On Thu, Jun 18, 2015 at 03:56:15PM +0200, Theo Buehler wrote:

>From looking at the source code, I'm quite sure that the other BSD's
behavior is the same as the current behavior in OpenBSD.

I agree that the formulations in the manpages and POSIX aren't explicit,
let alone unambiguous, as to what exactly is supposed to happen when
pressing "P".

However, what POSIX claims about "P" being a synonym of "p" is bogus:

*  BSD does not support the P command; moreover, in BSD it is
    synonymous with the p command.

Compare this with the following session:

$ ed
p
?
P
*p
?
*P
q
$

The source code in FreeBSD and NetBSD shows that the "print command p"
and the "prompt command P" are treated completely differently there as
well.


the posix stuff no doubt relates to traditional bsd behaviour. obviously
"P" is now supported.

if other systems behave this way and no one steps up to support the idea
of changing behaviour, i'll add a note to the doc. but i'll wait and see
first.

jmc

$ uname -a; ed -p "::> "
FreeBSD s3 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Tue May 12 19:33:13 UTC 2015 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
::> P
P
::> q
$

FreeBSD ed follows the behaviour of Theo Buehler's patch.

hth

Fred

Reply via email to