Re:Why do long options start with two dashes? (2019)
by c2xlZXB5Cg on Thursday April 08, 2021 @06:57PM
(#26744820)
that explains dig?
[ Parent
| on HN ]
Re:Why do long options start with two dashes? (2019)
by exac on Thursday April 08, 2021 @07:12PM
(#26744921)
And java -version
Re:Why do long options start with two dashes? (2019)
by dbt00 on Thursday April 08, 2021 @07:16PM
(#26744942)
Java never supported single letter options, which is why any other meta-character is necessary at all.
ls -la == ls -l -a, but then you can't ls -all because it's the same, you need --all (or +all).
Java supports -cp or -classpath but in both cases the token after the - always identifies a single option, so you don't need the second dash.
Re:Why do long options start with two dashes? (2019)
by rsj_hn on Thursday April 08, 2021 @08:06PM
(#26745298)
I get the logic, but it still creates cognitive load to have to keep track of what a given cli utility supports
Re:Why do long options start with two dashes? (2019)
by brianpan on Thursday April 08, 2021 @11:55PM
(#26746517)
java -version AND java --version
Maybe because java was intended to run on multiple operating systems, although both look out of place on MS-DOS!
Re:Why do long options start with two dashes? (2019)
by theandrewbailey on Friday April 09, 2021 @01:39PM
(#26753544)
java --version only works on Java 11 and newer.