Is there a standard or convention that specifies the long-form option negation prefix for a CLI? That is, which is correct?:
--nodaemonize --no-daemonize
I looked thru the POSIX specs, the Getopt::Long parsers, the manpages for getopt() and getopts(), and found nada! So what’s a coder to do? Write a Perl script, of course! I wrote script that parsed thru the entire man(1) set of pages, and pulled out both forms of negated long options. Here’s the result:
Without dash (no): 368 unique options With dash (no-): 1135 unique options
And the winner is… BOTH forms! There is no standard for it. The with-dash form was preferred 3:1, but that’s not enough margin to call it a clear winner.
What was apparent is for a single utility, use ONE OR THE OTHER. Don’t ever mix them for a single utility. And there you have it.