* util-linux: getopt: broken --name option for a while now
@ 2018-12-07 0:05 Andrey Repin
2018-12-07 10:31 ` Houder
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Repin @ 2018-12-07 0:05 UTC (permalink / raw)
To: All
Greetings, All!
This has been plaguing me for several years, but only now I got to test it
more thoroughly.
Shame on me.
$ /usr/bin/getopt --options '+H' --shell sh --name x -- -d
getopt: unknown option -- d
Expected output:
x: unknown option -- d
$ /usr/bin/getopt -V
getopt from util-linux 2.25.2
Poked around,
getopt from 2.20.1, 2.27.1, 2.31.1 and (reportedly)2.33 works as expected.
Is there a chance for an update?
--
With best regards,
Andrey Repin
Friday, December 7, 2018 2:51:20
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: util-linux: getopt: broken --name option for a while now
2018-12-07 0:05 util-linux: getopt: broken --name option for a while now Andrey Repin
@ 2018-12-07 10:31 ` Houder
2018-12-07 17:35 ` Andrey Repin
0 siblings, 1 reply; 3+ messages in thread
From: Houder @ 2018-12-07 10:31 UTC (permalink / raw)
To: cygwin
On Fri, 7 Dec 2018 02:56:50, Andrey Repin wrote:
> Greetings, All!
>
> This has been plaguing me for several years, but only now I got to test it
> more thoroughly.
> Shame on me.
>
> $ /usr/bin/getopt --options '+H' --shell sh --name x -- -d
> getopt: unknown option -- d
>
> Expected output:
> x: unknown option -- d
>
> $ /usr/bin/getopt -V
> getopt from util-linux 2.25.2
>
> Poked around,
> getopt from 2.20.1, 2.27.1, 2.31.1 and (reportedly)2.33 works as expected.
2.27.1? Typo?
See:
https://stackoverflow.com/questions/43078330/how-to-use-the-name-argument-to-getopt
( How to use the --name argument to getopt? )
"This is a bug (or just a non-portability issue) which is already fixed in
util-linux 2.28, by commit 30fbf2f6. Before this fix it worked only on Linux,
OSX and a few BSD flavors but not on WIN32 or GNU-Hurd for example".
The answer by "rudimeier" also decribes a temporary work-around.
Regards,
Henri
> Is there a chance for an update?
>
>
> --
> With best regards,
> Andrey Repin
> Friday, December 7, 2018 2:51:20
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: util-linux: getopt: broken --name option for a while now
2018-12-07 10:31 ` Houder
@ 2018-12-07 17:35 ` Andrey Repin
0 siblings, 0 replies; 3+ messages in thread
From: Andrey Repin @ 2018-12-07 17:35 UTC (permalink / raw)
To: Houder, cygwin
Greetings, Houder!
> On Fri, 7 Dec 2018 02:56:50, Andrey Repin wrote:
>> Greetings, All!
>>
>> This has been plaguing me for several years, but only now I got to test it
>> more thoroughly.
>> Shame on me.
>>
>> $ /usr/bin/getopt --options '+H' --shell sh --name x -- -d
>> getopt: unknown option -- d
>>
>> Expected output:
>> x: unknown option -- d
>>
>> $ /usr/bin/getopt -V
>> getopt from util-linux 2.25.2
>>
>> Poked around,
>> getopt from 2.20.1, 2.27.1, 2.31.1 and (reportedly)2.33 works as expected.
> 2.27.1? Typo?
No, just a different OS.
# lsb_release -a; /usr/bin/getopt -V; /usr/bin/getopt --options '+H' --shell sh --name x -- -d
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
getopt from util-linux 2.27.1
x: invalid option -- 'd'
--
> See:
> https://stackoverflow.com/questions/43078330/how-to-use-the-name-argument-to-getopt
> ( How to use the --name argument to getopt? )
> "This is a bug (or just a non-portability issue) which is already fixed in
> util-linux 2.28, by commit 30fbf2f6. Before this fix it worked only on Linux,
That explains it.
> OSX and a few BSD flavors but not on WIN32 or GNU-Hurd for example".
> The answer by "rudimeier" also decribes a temporary work-around.
--
With best regards,
Andrey Repin
Friday, December 7, 2018 20:24:07
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-07 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 0:05 util-linux: getopt: broken --name option for a while now Andrey Repin
2018-12-07 10:31 ` Houder
2018-12-07 17:35 ` Andrey Repin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).