【发布时间】:2017-03-28 19:31:15
【问题描述】:
在以下示例中,我预计错误消息来自xyz,而不是来自getopt。我做错了什么?
/tmp> getopt --name xyz --options "xyz:" -- -x
-x --
/tmp> getopt --name xyz --options "xyz:" -- -x -z
getopt: option requires an argument -- z
-x --
我怎么让它说xyz: option requires an argument -- z;这不是--name 的用途吗?
更新
似乎是一个错误。我的getopt来自cygwin
$ getopt --version
getopt from util-linux 2.25.2
【问题讨论】:
标签: command-line cygwin mingw getopt