This is the mail archive of the
cygwin
mailing list for the Cygwin project.
/usr/bin/getopt doesn't honor the -n option
- From: Mike Dornberger <Mike dot Dornberger at gmx dot de>
- To: cygwin at cygwin dot com
- Date: Thu, 19 Apr 2012 21:21:51 +0200
- Subject: /usr/bin/getopt doesn't honor the -n option
Hello,
`man 1 getopt' describes the -n/--name option as follows:
| The name that will be used by the getopt(3) routines when it
| reports errors. Note that errors of getopt(1) are still reported
| as coming from getopt.
But the -n option isn't honored:
$ /usr/bin/getopt -n myprog -o abc -- -x
getopt: unknown option -- x
--
$ LANG=C LC_ALL=C /usr/bin/getopt --version
getopt from util-linux 2.21
I tested under Debian Squeeze (getopt from util-linux 2.17.2) to see
that I did understand the description right:
$ /usr/bin/getopt -n myprog -o abc -- -x
myprog: invalid option -- 'x'
--
Sincerely,
Mike Dornberger
PS: Please Cc: me on replies since I'm not subscribed to the list.
--
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