Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is --help Flag A POSIX Standard/Recommendation?

Tags:

posix

If I have an application that runs via a shell, is there POSIX documentation that says --help support is required? I would think so, as this seems to be a standard practice among the most popular terminal applications (GNU tools, etc).

I'm mostly curious if I can use the presence or lack of a "--help" option as a litmus test for finding POSIX-compliant/non-compliant commands.

like image 995
Dave Avatar asked May 29 '13 17:05

Dave


1 Answers

POSIX doesn't mandate --help: http://pubs.opengroup.org/onlinepubs/009695399/utilities/ls.html

In fact, it seems that POSIX guidelines suggest avoiding options that aren't a single character (though it's not prohibited, just a guideline):

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.
like image 51
Michael Burr Avatar answered Sep 19 '22 22:09

Michael Burr