Re: [hackers] [sbase][PATCH] Support -- in all utilities except echo(1)

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Sun, 30 Jun 2019 10:56:17 -0700

On Fri, Jun 28, 2019 at 3:08 AM Michael Forney <mforney_AT_mforney.org> wrote:
>
> Then, maybe something like the following would work for those cases.
>
> ARGBEGIN {
> default:
> goto done;
> } ARGEND
> done:

Seeing as we have more confusion and bugs to deal with in argument
handling, perhaps now is a time to revist the conversation surrounding
getopt(3p)? There is a POSIX mandated libc function that parses POSIX
options following the utility syntax guidelines. I strongly suggest
using it. I know there has been pushback in the past but it's a
portable option that solves our exact problems. This is why it exists.
It's already part of libc. We should stop avoiding it in favor of a
difficult to read block of macros that have trouble dealing with corner
cases. Removing arg.h simplifies sbase code and maintenance and helps
break the cycle of NIH that we often fall into.
Received on Sun Jun 30 2019 - 19:56:17 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 01 2019 - 03:24:23 CEST