News for hackers. Stuff that matters.
Re:The -a to -z of Command-Line Options (2003) by dfox on Monday December 10, 2018 @11:32AM (#18649039)
One interesting thing to note is that IEEE 1003 says: "The -W (capital-W) option shall be reserved for vendor options."

GNU getopt() uses this to make --foo and -Wfoo equivalent, but this is GNUism of questionable utility.

I have feeling that original reason for this is that there historically was libc which implemented wordexp(3) by exec'ing /bin/sh -W, but I have no way to confirm that.

Re:The -a to -z of Command-Line Options (2003) by cyphar on Monday December 10, 2018 @01:30PM (#18650041)
I can imagine one of the reasons it might be useful is if you have a badly written argument parser that only accepts single-dash commands, but you need to pass a long argument (that gets shelled out). However, it's entirely opt-in so I imagine this is not practically useful for most programs.

Notably, GCC's -W<foo> works the same way. You could do "gcc --all" if you wanted to.