help-bash
[Top][All Lists]
Advanced

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

Handling getopt for option without optional argument value


From: lisa-asket
Subject: Handling getopt for option without optional argument value
Date: Fri, 23 Jul 2021 19:07:40 +0200 (CEST)


Greg,



We complicate because we want the capability to do more things, some more 
complicated than in the past.

Some of us have big aspirations. And some do not like the code to be so cryptic 
(single letter options only),

even though it satisfied the older cohort thirty years ago. But really, long 
options are not a new thing.

Resisting something which has become standard is not something that will 
enhance our capabilities today

and for the future.


From: Chet Ramey <chet.ramey@case.edu>
To: help-bash@gnu.org
Subject: Re: Handling getopt for option without optional argument value
Date: 23/07/2021 18:33:08 Europe/Paris

On 7/23/21 11:43 AM, Greg Wooledge wrote:

> The getopts (note the 's') builtin command replaces getopt, and is not
> broken. Use that instead. Or, if you need to handle --gnu-long-opts
> or -findopts, write your own option parser. Or don't write the program
> in bash in the first place. Or STOP FEELING THAT YOU NEED --gnu-long-opts
> or -findopts in your program. Just... don't do it.
> 
> People make their own lives SO much more complicated than they need to be.
> I don't understand why.

To be fair, you don't know their full requirements. It's all about fitting
the tool to your requirements.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/




reply via email to

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