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:23:16 +0200 (CEST)

From: Chet Ramey <chet.ramey@case.edu>
To: lisa-asket@perso.be;
   help-bash@gnu.org
Subject: Re: Handling getopt for option without optional argument value
Date: 23/07/2021 19:09:48 Europe/Paris
Cc: chet.ramey@case.edu

On 7/23/21 1:00 PM, lisa-asket@perso.be wrote:
> Good Evening Chet,
> 
> An maintainer of bash, I want to suggest an improvement to the capability 
> of bash built-in
> getopt to also handle long options, or another implementation with a 
> different name if
> you are worried that the changes could break people's scripts.

How would you propose adding the specification of these long options to the
existing getopts argument syntax in a compatible way?



Couldn't we get ideas from getopt and from gcc getopt.h ?



If it cannot be done compatible, there can be a new gnu built-in like there is 
getopt_long

in gcc getopt.h.



Handling long options has been done within gnu programs before, am I right ? 
This is about

introducing it for gnu bash.  Otherwise I will continue using getopt.  But some 
are saying that

getopt will not be supported in the next major release.  But this does not 
bother certain other

people of having others get their scripts broken.  What is the sense of not 
allowing getopt

when you don't provide a replacement !







-- 
``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]