News for hackers. Stuff that matters.
Re:Use long flags when scripting (2013) by dpcx on Friday September 18, 2020 @04:38PM (#24521663)
As does Python, which drives me crazy. -V is version on Python.
Re:Use long flags when scripting (2013) by MaxBarraclough on Friday September 18, 2020 @04:52PM (#24521778)
Very annoying. Java HotSpot uses -version, rather than --version, which is even worse. Don't mess with the standard long-form flag!
Re:Use long flags when scripting (2013) by LukeShu on Friday September 18, 2020 @05:28PM (#24522057)
To be fair, the JVM predates GNU-style --long flags being "standard". Lots of older programs use "X11-style" -long flags (that many pre-X11 programs used, like `find`).
Re:Use long flags when scripting (2013) by tannhaeuser on Saturday September 19, 2020 @03:34AM (#24525843)
Long flags are a GNUism, not a "standard" by any means. The closest that comes to a standard in this space are POSIX utility conventions [1].

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...

Re:Use long flags when scripting (2013) by hackerm0nkey on Friday September 18, 2020 @05:17PM (#24521960)
I get it wrong every damn time. 16 years and counting.
Re:Use long flags when scripting (2013) by iforgotpassword on Saturday September 19, 2020 @03:25AM (#24525818)
Same! Somehow I also start confusing this with somewhat related tools like gcc. It's rare enough that I need to query these that it's all blurry in my memory again by next time. "huh I guess gcc was that goofy one with just one dash.." Nope.
Re:Use long flags when scripting (2013) by nostoc on Friday September 18, 2020 @11:57PM (#24524888)
There's so much variation in flags for version, I've taken the habit of always using the long `--version` flag.
Re:Use long flags when scripting (2013) by jjgreen on Friday September 18, 2020 @07:27PM (#24522864)
... and it wrote the version to stderr up to 3.3, the stdout from 3.4; very convenient if you need to switch on version (which you do).