help-bash
[Top][All Lists]
Advanced

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

Re: Handling getopt for option without optional argument value


From: Greg Wooledge
Subject: Re: Handling getopt for option without optional argument value
Date: Fri, 23 Jul 2021 15:35:12 -0400

On Fri, Jul 23, 2021 at 09:24:32PM +0200, lisa-asket@perso.be wrote:
> I find that using "-x -y -z" rather than "-xyz" is of minor problem compared 
> to not
> 
> being have the capability to use long options.

That's perfect, then.  Simply drop the call to getopt, and use the
arguments exactly as provided by the user.

All that getopt does for you is unroll -xyz aggregates, and check for
invalid options.  That's it.  The --long-option handling is all yours
to do, either with or without a preceding call to getopt.



reply via email to

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