This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

/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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]