Subject: Re: bin/704: getopt and getopts are confusingly documented
To: None <jtc@wimsey.com>
From: John Hawkinson <jhawk@panix.com>
List: netbsd-bugs
Date: 01/06/1995 23:31:36
> The patch to the shell manpage, or something like it, is needed.
> Since it is possible that we'll be switching to another shell, a
> standalone getopts manpage may be preferable.

I don't see how it is legitimate to do so for an sh builtin...

> It looks like the added text was taken from POSIX.2 with little
> modification.  It will have to be changed or we'll have to get
> permission from IEEE to use it.

Err, sort of. I made a poor attempt to paraphase it in what
may or may not be acceptable. Probably obtaining IEEE permisison
would not hurt, if it was possible :-)

> The patch to getopt.c is incorrect.  Getopt is documented to insert a
> "--" between the flags and rest of the arguments.  When neither are
> present, getopt will still output the "--" delimiter.

Hmm; further reflection indicates you're right. I was concerned
with the null case returning things which break some non-NetBSD
shells (eg Ultrix sh complaints when it receives ``set -- --'').

--
John Hawkinson
jhawk@panix.com