bug-coreutils
[Top][All Lists]
Advanced

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

Re: POSIX misunderstanding


From: Paul Jarc
Subject: Re: POSIX misunderstanding
Date: Fri, 27 Aug 2004 00:09:07 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Albert Cahalan <address@hidden> wrote:
> ---------------- begin quote ---------------
> XBD ERN 16 Utilities that have extensions violating the Utility Syntax
> Guidelines Accept as marked.
>
> It was agreed that an interpretation be made , that the standard
> is clear and no change is required. The standard permits
> implementations to have extensions that violate the Utility
> Syntax Guidelines so long as when the utility is used in
> line with the forms defined by the standard that it follows
> the Utility Syntax Guidelines. Thus head --42 file
> and ls --help are permitted as extensions.
> ---------------- end quote -----------------

This doesn't mean what you think it means.  Note that it allows --42
(which is no help, since old code doesn't use that), not -42.  "when
the utility is used in line with the forms defined by the standard" -
i.e., when it matches the syntax of the guidelines - then "it follows
the Utility Syntax Guidelines" - i.e., it obeys the semantic
requirements of the guidelines.

> (note that this implies that "ls --help" does violate
> the Utility Syntax Guidelines, but that it's OK to do so)

Right - since it doesn't follow the syntax, the guidelines don't have
anything to say about the meaning of --help.  But the guidelines do
have something to say about the meaning of anything that does follow
the syntax, including -42 (specifically, that its meaning should be
the same as the meaning of -24, -2 -4, and -4 -2).  I'm no happier
about this than you are, but that's what the standard says.


paul




reply via email to

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