On 02/18/2013 01:31 PM, anatoly techtonik wrote:Long options are not specified by POSIX. But they are commonly
>> We HAVE documented it. We document that ALL long options can be
>> represented by an unambiguous prefix, so --h is an unambiguous prefix of
>> --help if there are no other long options beginning with h.
>
> Is it a part of POSIX, RedHat or just usual man page for 'users'? Can you
> post a proof link here?
implemented by getopt_long(), which documents the GNU-standard behavior
of recognizing unambiguous prefix. The glibc manual doesn't document
prefix handling (arguably a bug in glibc documentation, but that is not
a question for this list):
https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#Getopt-Long-Options
but the Linux man pages DO document abbreviations:
http://linux.die.net/man/3/getopt_long
"Long option names may be abbreviated if the abbreviation is unique or
is an exact match for some defined option."
Coreutils also documents it here:
https://www.gnu.org/software/coreutils/manual/coreutils.html#Common-options
which is very near the beginning of 'info coreutils', our preferred
documentation system.
>Yes, if there is existing practice of burning '-h' to mean help in some
> Do I understand it right that if OpenBSD implements "-h" - you'll copy?
other implementation, then the option cannot be standardized by POSIX to
mean anything else, so we might as well also make it mean help. But we
aren't going to lead the pack on burning a short option for something
like help.
> I don't get why GNU development and usability features should depend onGNU prefers long options. We support short options insofar as standards
> non-GNU implementation?
documents and compatibility dictate, but don't let short options drive
development.