You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the SYNOPSIS of a standard utility shows an option with a mandatory option-argument (as with [ -c option_argument] in the example), a conforming application shall use separate arguments for that option and its option-argument. However, a conforming implementation shall also permit applications to specify the option and option-argument in the same argument string without intervening characters.
An option and its argument may or may not appear as separate tokens. (In other words, the whitespace separating them is optional.) Thus, -o foo and -ofoo are equivalent.
getopts_long
For an option with a mandatory option-argument, -o foo and -ofoo are equivalent.
Commander
For an option with a mandatory option-argument, -o foo and -ofoo are equivalent.
Minimist
Has some complex cases about other syntax that are accepted after the short option, but the main syntax is for an option expecting an argument that -o foo and -o=foo are equivalent.
Yargs
Has some complex cases about other syntax that are accepted after the short option, but the main syntax is for an option expecting an argument that -o foo and -o=foo are equivalent.
Activity
ljharb commentedon Mar 10, 2022
It’s super weird to use an equals sign with a short argument, even weirder than omitting one with a long argument. I’d prefer not to support it.
refactor!: parsing, revisit short option groups, add support for comb…
shadowspawn commentedon Mar 30, 2022
Will reopen if becomes relevant again.