POSIX Standard – Is the Double Dash Still Used for Long Switches?

posix

I've read several question about double dash:

Single dashes - for single-character options, but double dashes -- for words?
What does -- (double-dash) mean? (also known as “bare double dash”)

However I remember about a teacher 4 years ago telling me that -- was the posix way of dealing with long switches like --help or --color=.
Today, I'm using a lot of command where this rule is not respected at all and the best example I can came up with is find where no long switches takes a double-dash even with the very annoying AIX find.

Was my teacher wrong? or does the rule changes since (which seems unlikely)?
And finally, is there any posix rules about the length of option and - or -- ?

Best Answer

I think POSIX doesn't define long options :

Guideline 3: Each option name should be a single alphanumeric character (the alnum
character classification) from the portable character set. The -W (capital-W) option shall be reserved for vendor options.

Multi-digit options should not be allowed.

The double dash is a GNU convention.

In the POSIX definition of find the "long switches" with single dash are not part of the options, but an expression given as an operand.