Open
Description
Taking a look at how implementations deal with option-arguments. Some made up terminology to describe the behaviours.
- "greedy" vs "choosy" vs "embedded"
- greedy: any value consumed with
-w VALUE
, including starting with hyphen - choosy: some values are rejected for
-w VALUE
, such as starting with hyphen - embedded: the only way to supply a value is embedded in the argument, like
-wVALUE
or--with=VALUE
- greedy: any value consumed with
- "required" vs "optional"
- required: the option requires an option-argument
- optional: the option can be used with or without an option-argument
Taking a look at the reference specifications and implementations from #76
POSIX: describes "greedy required" and "embedded optional"
GNU: no changes
getopt_long
: "greedy required" and "embedded optional"
Commander: "greedy required" and "choosy optional"
Yargs: "choosy required" and "choosy optional"
Minimist: "choosy optional" (I didn't see how to make the option-argument required.)
Metadata
Metadata
Assignees
Labels
No labels