[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 21:27:30 +0200 (CEST) |
From: Dennis Williamson <dennistwilliamson@gmail.com>
To: help-bash <help-bash@gnu.org>
Subject: Re: Handling getopt for option without optional argument value
Date: 23/07/2021 21:14:02 Europe/Paris
On Fri, Jul 23, 2021, 1:43 PM Greg Wooledge <greg@wooledge.org> wrote:
>
>
> The "-xyz to -x -y -z" unrolling that getopt does is fundamentally
> incompatible with the -findopts option style. There's no way to tell
> whether -bar is meant to be one option, or three options.
>
The only way this could be handled would be to check for long option
matches first then unroll the ones that didn't have matches. Still prone to
ambiguities, errors and confusion.
---
I can see that a posix compliant capability that includes long options requires
more than
one brain. Start with something, than handle remaining problems as other did
into the
code.
- Re: Handling getopt for option without optional argument value, (continued)
Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/23
- Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/23
- Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/23
- Re: Handling getopt for option without optional argument value, Dennis Williamson, 2021/07/23
- Handling getopt for option without optional argument value,
lisa-asket <=
- Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Lawrence Velázquez, 2021/07/23
- Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/23
- Handling getopt for option without optional argument value, lisa-asket, 2021/07/23
- Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/24
- Re: Handling getopt for option without optional argument value, Chet Ramey, 2021/07/24
- Re: Handling getopt for option without optional argument value, Chris Elvidge, 2021/07/24
- Re: Handling getopt for option without optional argument value, Chris Elvidge, 2021/07/24
Re: Handling getopt for option without optional argument value, Greg Wooledge, 2021/07/23