3 ms·
Double dash for long args is a GNUism. One which even they don't adhere to uniformly as evidenced by GCC's options.
by kevin_thibedeau 2y ago
Double dash for long args is a GNUism. One which even they don't adhere to uniformly as evidenced by GCC's options.
- codesnik 2y agoit's a simple to learn gnuism that most good tools follow but (mostly) java apps for whatever reason disrupted it and added a lot of mess.
- layer8 2y agoThe Java tools predate the GNU convention (or at best were developed at the same time, unbeknownst to each other). Golang uses single-dash as well (but also accepts double-dash), as do PowerShell and Unix commands like find. In early Unix, there wasn’t a clear convention to use a dash for options at all (dd, tar, ps).
- kevin_thibedeau 2y agoGNU was established 10 years before Java.
- layer8 2y agoGNU double-dash long options were devised only after POSIX disallowed using the plus sign in 1992: https://blog.djmnet.org/2019/08/02/why-do-long-options-start-with/ https://blog.djmnet.org/2019/08/02/why-do-long-options-start... Java was already two years in development at that time.
- camel-cdr 2y agoIt is, but combining a sequence of flags is POSIX.