Re:-h –Help -help Help –? –?
by randomdata on Monday April 11, 2022 @07:59PM
(#30996819)
Trouble is that some competing approaches appeared around the same time in history and what is convention depends on what you happened to be exposed to.
[ Parent
| on HN ]
Honest question: the BSDs adopted getoptlong() 20 years ago[0], what are people being exposed to that uses -single-dash-long-options?[1]
Or were you referring to older utilities/actual unix times?
[0] https://www.freebsd.org/cgi/man.cgi?query=getopt_long&sektio... [1] I mean, there's oddities such as openssl(1) but those seem a minority on every platform
Re:-h –Help -help Help –? –?
by everybodyknows on Tuesday April 12, 2022 @12:00PM
(#31004413)
> what are people being exposed to that uses -single-dash-long-options?
Go's 'flag' package -- although double-dash is silently accepted on the command line.
The deeper issue with 'flag' is that it rejects the BSD convention of a short/long option pair having guaranteed equivalent semantics e.g. -h/--help. The library just won't let the programmer create such a pair by means of its standard functions.
Re:-h –Help -help Help –? –?
by randomdata on Tuesday April 12, 2022 @01:09PM
(#31005444)
> Go's 'flag' package
Which uses the Plan 9 convention; the system the Go creators were exposed to. A good example of competing conventions of the past rearing itself in modern tools.